Loading shared modules dynamically

15 views
Skip to first unread message

sm

unread,
Jul 20, 2017, 7:08:34 AM7/20/17
to Angular and AngularJS discussion
My current application is developed using angularjs 1.4. in this application i am using HTML5 import to load the UI of another application(microservice) . this is lazy loaded using ocLazy load wherever the directive of application 2 is used in application1 as <load-application2></load-application2>. We are also using zuul proxy call to get the application 2 loaded in application using import of html5. this is working as expected without any issues. Now we are migrating to Angular 2. As we use typescript the above doesnt work,becauses it needs resources at the build time. is there a way to achieve the same in Angular without compromisimg on AOT. please provide any references for my usecase

Sander Elias

unread,
Jul 24, 2017, 2:04:41 AM7/24/17
to Angular and AngularJS discussion
Hi Sm,

Currently this is very hard to do, and even harder if you want to have AOT. Its not impossible, but not something for the faint of hearts. There will be (at least that's what i was promised :) ) a better solution in ng5. It's not yet in the current beta, but I expect it to be added along the way.

Regards
Sander 
Reply all
Reply to author
Forward
0 new messages