我看我那个项目别人写的代码不在html里面绑定ng-app也能绑定,我想知道是这么做到的?而且我就在html里面写ng-app都不能绑定了。。。
angular有手动启动的api,angular.bootstrap
http://docs.ngnice.com/api/ng/function/angular.bootstrap
<div id="app"></div>
angular.bootstrap(document.getElementById("app"), ['app']);
我看我那个项目别人写的代码不在html里面绑定ng-app也能绑定,我想知道是这么做到的?而且我就在html里面写ng-app都不能绑定了。。。
angular有手动启动的api,angular.bootstrap
http://docs.ngnice.com/api/ng/function/angular.bootstrap
<div id="app"></div>
angular.bootstrap(document.getElementById("app"), ['app']);