I was trying to add two sub-child routes to a child route as seen below, but when I execute the code the styles don't apply to the sub-child components and the console shows the following error:
Refused to apply style from 'http://localhost:4200/stations/styles.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled
And here's how I added the sub-child routes:
{
path: '', component: HomeComponent,
children: [
{ path: 'stations', component: StationsComponent,
children: [
{path: 'add', component: AddComponent},
{path: 'edit', component: EditComponent}
]},
{ path: 'vehicles', component: VehiclesComponent}
]
}
and therefore not accepted as a valid stylesheet
I'm looking forward to your help.
In my case was missing </head>
closing tag, in the file index.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With