标签:io ar java sp div on cti bs html
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>angular.js</title> <script type="text/javascript" src="./js/script.js"></script> <!--<script type="text/javascript" src="./js/angular-1.3.0.js"></script> <script type="text/javascript" src="./js/app.js"></script>--> </head> <body> <div ng-controller="WelcomeCtrl"> <p ng-bind="greeting.text"></p> </div> </body> <script type="text/javascript"> var script= $script; script.path("js/"); script(‘angular-1.3.0‘,function () { script(‘app‘,function () { angular.bootstrap(document,[‘demo‘]); }); }) </script> </html>
区别就是在异步加载中需要手动启动angular,同事也要去掉 ng-app指令 否则会启动失败(还是可以手动启动的),提示 没有的模型
//手动启动angular angular.bootstrap(document,[‘demo‘]);
标签:io ar java sp div on cti bs html
原文地址:http://my.oschina.net/u/574928/blog/342632