角度控制器不显示输出

时间:2015-08-10 10:29:19

标签: angularjs

我启动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. 

1 个答案:

答案 0 :(得分:0)

请参阅以下工作代码 -

&#13;
&#13;
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;
&#13;
&#13;