requirejs-angular-loader
requirejs-angular-loader copied to clipboard
not work Appended Routes
it seems to me that the line "ng.bootstrap(root, [name]);" breaks controller.
https://github.com/angular-ui/ui-router/issues/1172#issuecomment-48275219
This is just manually app's bootstrap and it probably can not break controller.
Also you can try other way to boot app:
define(function(require) {
require('modules/foo/foo-includes');
require('modules/bar/bar-includes');
require('modules/application/application-includes');
var ng = require('angular');
ng.module('my-app', [
'application',
'foo',
'bar'
]);
angular.resumeBootstrap();
});
<div ng-app="my-app"></div>
And add at the init script window.name = "NG_DEFER_BOOTSTRAP!";. You can read about this here.
Thanks for trying to help! Uncaught TypeError: undefined is not a function
angular.resumeBootstrap();
ng.resumeBootstrap();
You should set window.name = "NG_DEFER_BOOTSTRAP!";. As I wrote before more details here - https://docs.angularjs.org/guide/bootstrap#deferred-bootstrap