Hi,

Can you share a use case for dynamically injecting modules? A plunker will be 
helpful.

Regards,

Vaibhav Gupta

From:  <[email protected]> on behalf of hardik Patel 
<[email protected]>
Reply-To:  <[email protected]>
Date:  Tuesday, 5 April 2016 at 12:08 PM
To:  <[email protected]>
Subject:  Re: [AngularJS] Re: add angular module to main module runtime using 
reuqirejs

Actually, i want to add sub modules in main module after bootstrap.

On Tue, Apr 5, 2016 at 11:02 AM, Vaibhav Gupta <[email protected]> 
wrote:
Hi,

I am assuming that you don't want to inject sub modules to main module, rather 
you want to load modules dynamically along with main module. You can manually 
bootstrap your application using a code like the following:

if(/*some condition*/){
 angular.bootstrap(document, ['mainModule','module1']);
}
else{
 angular.bootstrap(document, ['mainModule','module2']);
}


Please refer to the documentation here:

https://docs.angularjs.org/api/ng/function/angular.bootstrap

Does this fulfil your requirement?

Regards,

Vaibhav Gupta

On Tuesday, 5 April 2016 10:23:43 UTC+5:30, hardik Patel  wrote:
I am working on Angular Application. I have a application with multiple 
modules. Application structure is like i have a Main Module and at run time i 
want to inject sub modules in main module.

Please help me out.

Thanks in Advance
-- 
You received this message because you are subscribed to a topic in the Google 
Groups "AngularJS" group.
To unsubscribe from this topic, visit 
https://groups.google.com/d/topic/angular/GznpwAczego/unsubscribe.
To unsubscribe from this group and all its topics, send an email to 
[email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.


-- 
You received this message because you are subscribed to a topic in the Google 
Groups "AngularJS" group.
To unsubscribe from this topic, visit 
https://groups.google.com/d/topic/angular/GznpwAczego/unsubscribe.
To unsubscribe from this group and all its topics, send an email to 
[email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

-- 
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 https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to