How to view the page source for angular 2 app

前端 未结 1 521
说谎
说谎 2021-01-15 12:09

I have web app, whenever i am view the page source using browser view page source i am only able to see the index.html contents in page source where as i am able to see the

相关标签:
1条回答
  • 2021-01-15 12:53

    It is only possible with Angular Universal (server side rendering). Every javascript files renders in browser, to see page source you have to setup Angular 2 to render on server side. It's also useful for SEO optimization.

    On this site you have guide how to setup it.

    For Angular 5 you have to visit this page, for more informations.

    For example working on NodeJS visit this page

    0 讨论(0)
提交回复
热议问题