标签:$scope utf-8 meta cli style lang charset rip button
<!DOCTYPE html>
<html lang="en" ng-app="btn">
<head>
<meta charset="UTF-8">
<title>Title</title>
<script src="angular.js"></script>
</head>
<body>
<div ng-controller="con1">
<input type="button" value="按钮" ng-click="a=!a">
<div style="background: red;width: 300px;height: 300px;" ng-show="a"></div>
</div>
<script>
var app=angular.module(‘btn‘,[]);
app.controller(‘con1‘,function ($scope) {
$scope.a = true;
})
</script>
</body>
</html>
标签:$scope utf-8 meta cli style lang charset rip button
原文地址:http://www.cnblogs.com/qiudongjie/p/6562144.html