angular中ng-bind指令小案例

<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title></title>
    <script src="angular/angular.js"></script>
</head>
<body ng-app="myApp">
  <span ng-bind="msg"></span>
  <br/>
  <!--<input type="text" ng-model="msg"/>-->


<script>
    var app=angular.module("myApp",[]);
      app.run(function($rootScope){
          $rootScope.msg="hello,word" ;
      })
</script>
</body>
</html>

 

posted @ 2016-10-02 20:09  萧诺  阅读(1082)  评论(0编辑  收藏  举报