1
我目前使用bootstrap
角以這種方式運行我的應用程序:bootstrap方法和run方法在角度上有什麼區別?
ng.bootstrap(document, ['main']);
角文檔指出
Run blocks are the closest thing in Angular to the main method.
A run block is the code which needs to run to kickstart the application.
那麼什麼是它們之間的區別?
這樣做的特殊原因?引導是通過在您的index.html中添加ng-app =「appName」來實現的 – 2014-11-23 18:22:36
我正在使用requirejs加載一堆文件,當所有依賴關係解析後我才能啓動應用程序 – 2014-11-23 18:25:27
我猜你不允許在引導函數中定義常量或值。我相信你也可以在bootstrap中啓用或禁用調試。 – 2014-11-23 20:53:06