Join the Stack Overflow Community
Stack Overflow is a community of 6.6 million programmers, just like you, helping each other.
Join them; it only takes a minute:
Sign up

Our setup is a node express backend and angular1 frontend (1.5). We have a large app with many plugins. Which plugins are included in the page is determined with express and then we put angular modules from these plugins into the dom on page load. We can do this by attaching angular.module from the plugin code.

app/
  core/
  plugins/
    //contents are dynamic based on user/group/etc.
    //modules are dumped into here and attached to angular
   //plugin1/1.0/bundle.js angular.module('plugin1',[]);...
   //this now makes it available to angular module above it.

We are trying to implement the same thing in angular2. The problem is that angular2 is compiled and requires that you declare all modules up front and compile.. is there a way to do this dynamically at run time without needing to re-compile? I understand that there is some sort of reflection going on which is how typing is enforced. I imagine that AOT is no longer an option with this.

share|improve this question

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.