moff / angular2-flash-messages

Angular 2 flash messages module
52 stars 21 forks source link

Support lazy loading #12

Closed berndartmueller closed 6 years ago

berndartmueller commented 7 years ago

To be able to use lazy loaded modules, a singleton instance of the FlashMessageService is needed and therefore the FlashMessagesModule must be imported in the application's root module with FlashMessagesModule.forRoot(). Otherwise it will cause problems because of child dependency injections. See http://blog.angular-university.io/angular2-ngmodule/ for further explanation.

moff commented 6 years ago

@berndartmueller Thanks for the contribution! It'll be merged in new version asap.