Google spider gives 404 error on Angular links: how to fix it?

180 views Asked by At

I use custom angular tags [{ }] to avoid conflicts with Twig.

In the first version of my website I used:

<a href="[{ article.slug | url }]">Article</a>

Of course, I found many 404 Google spider errors. So I changed everything in:

<a href="#" ng-href="[{ article.slug | url }]">Article</a>

but surprisingly I get again 404 error on: http://www.myangularwebsite.com/[%7B%article.slug%20%7C%20url%20%7D]

How is it possible? Why spider is reading ng-href tag? How to prevent this error?

0

There are 0 answers