angularjs为什么无法运行正确?是没有执行脏检查的原因吗?
版本号/*
AngularJS v1.4.6
(c) 2010-2015 Google, Inc. http://angularjs.org
License: MIT
*/
[b]以下是想实现点击复选框出现相应的内容,但是无法运行正确也没法报错,望大神指点下原因,小弟初学Ng[/b]
<!DOCTYPE html>
<html ng-app="myApp">
<head>
<meta charset="utf-8">
<link href="css/bootstrap.min.css" rel="stylesheet"/>
<script src="../angular/angular-min.js"></script>
<style>
.orderColor{color:red;}
</style>
</head>
<body>
<div ng-controller="controller" class="container">
电影:<input type="checkbox" ng-model="data.movie" ng-true-value="1" ng-false-value="0">
游戏:<input type="checkbox" ng-model="data.game" ng-true-value="1" ng-false-value="0">
{{"movie"+data.movie+"game"+data.game}}
</div>
<div ng-show="data.movie==1">
<h4>电影:</h4>
<textarea>这个是电影的内容</textarea>
</div>
<div ng-show="data.game==1">
<h4>游戏:</h4>
<textarea>这个是游戏的内容</textarea>
</div>
</body>
<script>
var myApp = angular.module("myApp", []);
myApp.controller("controller",["$scope", function ($scope) {
$scope.data = {
game:0,
movie:0
};
}]);
</script>
</html>