Is there any way to use parent attached CSS file use in child page
In my PageLayout I have:
@Component({
styleUrls: [
"../assets/css/bootstrap.min.css",
"../assets/css/font-awesome.min.css",
"../assets/css/theme.min.css"],
templateUrl: "_layout.html"
})
In _layout.html
<router-outlet>
</router-outlet>
After calling child URL, child page is rendering but parent CSS is not applying. After checking in dev mode in chrome, I have found that for parent page
ul[_ngcontent-yny-1], li[_ngcontent-yny-1], span[_ngcontent-yny-1], div[_ngcontent-yny-1], button[_ngcontent-yny-1], input[_ngcontent-yny-1], select[_ngcontent-yny-1], span[_ngcontent-yny-1], label[_ngcontent-yny-1]
for child page
ul[_ngcontent-yny-2]
as highlighted in screenshot attached
Route Config for app and layoutpage are below
export const appRoutes: Routes = [
{
path: "", component: PageLayoutComponent
},
{
path: "", component: PageLayoutComponent, children: PageRoutes
}
]
export const PageRoutes: Routes = [
{
path: "", component: LandingComponent
},
{
path: "landing", component: LandingComponent
}
]