Код: Выделить всё
import { Routes } from '@angular/router';
import { HomeComponent } from './core/home/home.component';
import { ChapterComponent } from './areas/StrumMain/chapter/chapter.component';
export const routes: Routes = [
{ path: '', redirectTo: 'Home', pathMatch: 'full' },
{ path: 'Home', component:HomeComponent },
{ path: 'Chapter/:id', component:ChapterComponent },
];
Refused to apply style from 'http://localhost:4200/Chapter/styles.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.
GET http://localhost:4200/Chapter/polyfills.js net::ERR_ABORTED 404 (Not Found)
GET http://localhost:4200/Chapter/main.js net::ERR_ABORTED 404 (Not Found)
GET http://localhost:4200/Chapter/scripts.js net::ERR_ABORTED 404 (Not Found)
Refused to execute script from 'http://localhost:4200/Chapter/scripts.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
< /code>
По какой -то причине он пытается загрузить файлы JS и CSS из каталога главы (что не должно произойти) < /p>
Я не имею никакой подсказки, почему это происходит. (*branch: strum_poc).
В компоненте главы я попытался прочитать параметр маршрута, но до этого я получаю ошибку.
Подробнее здесь: https://stackoverflow.com/questions/786 ... ot-working
Мобильная версия