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>