Hi,
I was atttempting to bootstrap module hierarchies based on the URI.
bootstrap.js
if ( document.documentURI === 'uri1') {
angular.bootstrap(document, ['lob1']);
}else{
angular.bootstrap(document, ['lob2']);
}
This is what I tried. Can I do this ? I will load 'lob1' or lob2' based on a
condition.
If my app.js is not correct then I want to restructure it. How ?
Moreover these two modules should only be associated like this.
lob1 - > 'module1/moduleLoader1' (Load only when lob1 is bootstrapped )
lob2 -> 'module2/moduleLoader2' (Load only when lob2 is bootstrapped )
app.js
define([
'framework-library',
'module1/moduleLoader1',
'module2/moduleLoader2',
], function(jquery, angular) {
'use strict';
return angular.module('lob1', [
'ui.router',
'app.module1'
]);
},function(jquery, jm, angular) {
'use strict';
return angular.module('lob2', [
'ui.router',
'app.module2'
]);
}
);
Thanks,
Mohan
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.