What is wrong here? I\'m trying to make it work but I get that error in the header. I have included the
in the app
In My scenario, I made mistake like below
@NgModule({
imports: [RouterModule.forChild(routes)],
exports: [RouterModule]
})
export class NewTestRoutingModule {
static component : [NewTestContainerComponent, NewTestInletComponent, NewTestStructureComponent]
}
and in Module
@NgModule({
declarations: [LayersRoutingModule.component],
The components array in Routing should be like this.
static component = [NewTestContainerComponent, NewTestInletComponent, NewTestStructureComponent]
This happened to me as well, in @Component
I wrote selector: all-employees
and in app.module.ts
module it was <all- employees></all- employees>
I was getting this error because I mistakenly put TestBed.configureTestingModule
outside of a beforeEach
block.
Experienced this with Angular 2 and it turns out it has something to do with imports and relative paths, if you're exporting something in from the same location
For instance when using barrels, explicitly specify the ./
export * from './create-profile.component';
instead of
export * from 'create-profile.component';
In my case, on app.module.ts ( Ionic 3 )
providers: [
, StatusBar
, SplashScreen
Changed to:
providers: [
StatusBar
, SplashScreen
And works.
It was caused because I repeated the export in one of my index.ts file: