PatrickJS-starter icon indicating copy to clipboard operation
PatrickJS-starter copied to clipboard

Type X is part of the declarations of 2 modules: AppModule and AsyncModule

Open orlov-vo opened this issue 10 years ago • 4 comments

Type ContentComponent is part of the declarations of 2 modules: AppModule and AsyncModule

I have 2 modules:

  • AppModule - root module
  • AsyncModule - module which is loaded asynchronously (as Detail component - async routing)

These modules use the same component ContentComponent. And on RC-4 it's ok... But on RC-5 I have this problem...

orlov-vo avatar Aug 29 '16 07:08 orlov-vo

@orlov-vo : Do you have this component declared in both the modules?. If you just declare in AppModule then you don't have to declare it again in AsyncModule . It will be available for the entire app.

gaurav2887 avatar Aug 29 '16 18:08 gaurav2887

Same issue. The directives declared in AppModule not working on Lazyload module. Directive host listener not working on lazyload module for specific

daominhsangvn avatar Mar 17 '17 01:03 daominhsangvn

Turn all of them into modules to make it work.

daominhsangvn avatar Mar 17 '17 01:03 daominhsangvn

using @IonicPage({ name: 'login-page' }) and this.nav.push('login-page')

hdung912 avatar Jul 17 '17 15:07 hdung912