-1

I have a website containing custom elements (i use angular 2), and google fails to parse them correctly :

It only sees

<my-app></my-app> 

It seems that the value of this component is not retrieved at all by google robots.

Is there a best practice / workaround ?

Thanks for your help.

matth3o
  • 3,229
  • 3
  • 20
  • 24

2 Answers2

0

This has been asked a million times. Please refer to this question and this specific page by google.

Times have changed. Today, as long as you're not blocking Googlebot from crawling your JavaScript or CSS files, we are generally able to render and understand your web pages like modern browsers. To reflect this improvement, we recently updated our technical Webmaster Guidelines to recommend against disallowing Googlebot from crawling your site's CSS or JS files.

Community
  • 1
  • 1
Muli Yulzary
  • 2,559
  • 3
  • 21
  • 39
-2

What you can do is getting the HTML of your rendered page and inserting it into the <my-app></my-app> tags without user information or the like.

This will get replaced anyway after Angular has booted up, this means you can even put something completely different in there.

Maximilian Riegler
  • 22,720
  • 4
  • 62
  • 71