简体   繁体   中英

Angular 2 routing from one component to another then CSS is not applied

When I route from one component to another then CSS is not applied for that new component. But when I inspect the element it shows css properties are applied to the element but not rendered. But when I refresh the page or even close the dev tools then that element is displayed on screen immediately without making any changes.

So not sure how to go about resolving this issue.

This issue was related to fonts. As we are using angular-cli which uses webpack to bundling. Webpack was unable to bundle fonts properly which was causing it to not render the elements correctly. Its a known issue in angular-cli https://github.com/angular/angular-cli/issues/1463

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM