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.
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.