Dynamically add meta description based on route in Angular

前端 未结 5 1106
自闭症患者
自闭症患者 2020-12-23 10:55

I\'m using Angular 5 to build a small brochure type website. Thus far, I have my routes set up, and the page title changes dynamically based on the activated route. I got th

5条回答
  •  -上瘾入骨i
    2020-12-23 11:16

    Since Angular pages are rendered at client side, its not possible for crawlers to detect meta tags. Most of the crawlers do not execute javascript at runtime due to which dynamic meta tags are not detected. This is true even for Facebook and Twitter.

    Its required to use Angular Universal for Server Side Rendering or prerendering service e.g prerender.io

提交回复
热议问题