我启动AngularJs,当我在js文件中写东西时,out不显示。
html ng-app
script src="//ajax.googleapis.com/ajax/libs/angularjs/1.3.0-rc.3/angular.min.js"
body ng-controller="simpleController"
<br />
{{tags}}
function simpleController($scope){
$scope.tags = [
{done: false, text: 'fist'}
];
}
{{tags}} is not updating when i make some change.
答案 0 :(得分:0)
请参阅以下工作代码 -
function simpleController($scope) {
$scope.tags = [
{
done: false,
text: 'fist'
}
];
}
&#13;
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.23/angular.min.js"></script>
<html ng-app>
<body ng-controller="simpleController">{{tags}}</body>
</html>
&#13;