common header in other module issue is
not working when add selector in other module then select app header for ex it is in shared module need to access in another module for that follow steps first in shared module in export declare app header then that module import in another module whre you need to get app-header
1.import module which component you need to access in the module ex:shared
imports: [
BrowserModule,
BrowserAnimationsModule,
FormsModule,
ReactiveFormsModule,
AppRoutingModule,
RouterModule,
NgbModule,
SharedModule,
CarouselModule,
CommonModule,
NgSelectModule
],
providers: [],
bootstrap: [AppComponent],
schemas: [CUSTOM_ELEMENTS_SCHEMA]
})
export class AppModule { }
here export components which you lik to use has headers.then sharedmodule in module2 imports
imports: [
CommonModule,
RouterModule,
NgbModule,
NgSelectModule
],
exports: [
LoaderComponent,
TapToTopComponent,
FooterComponent,
FullLayoutComponent,
ContentLayoutComponent,
SearchDatePipe,
HeaderComponent,
NavbarComponent
],
})
export class SharedModule { }
No comments:
Post a Comment