Probably obvious for most, but I still cannot find it out myself.
I have an angular application and the following relevant files
app/app.module.ts
app/dashboard/dashboard.component.html
app/dashboard/stats-tile/stats-tile.component.html
I generated the stats-tile component with ng generate so in the app.module.ts its imported and also in the declarations:
//app.module.ts
declarations: [
AppComponent,
TournamentSearchComponent,
DashboardComponent,
StatsTileComponent
],
Now I want to show the stats-tile component
//dashboard.component.html
<app-dashboard-stats-tile></app-dashboard-stats-tile>
I get:
Error: Template parse errors:
'app-dashboard-stats-tile' is not a known element:
What am I doing wrong. I am able to use another component i generated in the app component. is there some difference when I generate it in a subfolder? I am a bit new to angular but my understanding is that everything imported/declared in app.module.ts is available to the whole app.
AppModule?