0

Please follow my below thread, I tried searching alot online

Header and Footer in Angular 5

Tried many examples :

https://angular.io/guide/universal https://coursetro.com/posts/code/68/Make-your-Angular-App-SEO-Friendly

I am able to see the tag in the browser, but when not in the view-source.

Please suggest me a working example or a plunkr, thanks.

Kamlesh Katpara
  • 373
  • 2
  • 8
  • 31

2 Answers2

0

you must include Angular universal so as to get the title & meta tags rendered in the page source.

Please follow this link: https://github.com/angular/angular-cli/wiki/stories-universal-rendering

https://malcoded.com/posts/angular-fundamentals-universal-server-side-rendering

I too ran into the same issue during the past week & I solved it using the above things. Please follow the steps & you can get it rendered on the page as shown below

enter image description here

Roger Jacob
  • 350
  • 2
  • 11
  • 1
    I tried this code, got alot of errror while executing the code, author of this post has not updated the code, Its way different than his repo on github https://github.com/LukasMarx/AngularUniversalGuide/ – Kamlesh Katpara Feb 12 '18 at 22:28
  • Please clone this repo & compare it with yours. I got this working with the above tutorials & I had attached the screenshot of the page source. https://github.com/rogerjacob/ssr-demo-1 – Roger Jacob Feb 13 '18 at 00:40
0

This is what I found working :

https://github.com/angular/angular-cli/wiki/stories-universal-rendering

Kamlesh Katpara
  • 373
  • 2
  • 8
  • 31