Normally if I click link on home link to detail link, like <a routerLink="/detail/{{record.TA001}}">
,it work well and css file got very well.
As only I refresh this detail page, like localhost:3000/detail/0006
it got data ok, but get CSS file change the directory to the detail instead root directory, could not get the CSS file. My detail component is in app/content
directory.
My index.html
and CSS file in project root directory.
router :
const appRoutes: Routes = [
{
path: 'contact',
component: Contactcomponent
},
{
path: 'detail/:id',
component: Detailcomponent
},
{ path: '',
component: Contentcomponent
}
My project directory is like this: