0

I have taken the lot of contents using AngularJs.

But the contents are not showing in the view source.

View page should show the contents in view source using AngularJs.

Let me know, If there is any method to use to show the contents in view source of view page using AngularJs.

Now My Contents using AngularJs is not visible in the view source of my website.

Cœur
  • 37,241
  • 25
  • 195
  • 267
KesaVan
  • 1,031
  • 16
  • 32
  • That's normal, DOM is constructed on the fly by angularjs... the only way to view the source is by using the dev tools like chrome debug / firebug etc ... Why do you want to see the source ? SEO concerns ? – Jscti Oct 08 '14 at 08:44
  • @Cétia:For SEO, Is there any other way to get the contents on? – KesaVan Oct 08 '14 at 10:32
  • @KesaVan Hi did u get any solution for this...??? please guide me also... now am facing same issue.. – Abijith Ajayan Mar 09 '19 at 09:37

2 Answers2

1

This is expected JavaScript behaviour. Changes done after the page has loaded into the browser are not visible in the "view source"

hakazvaka
  • 735
  • 6
  • 19
1

That's normal, DOM is constructed on the fly by angularjs... the only way to view the source is by using the dev tools like chrome debug / firebug etc

If you have some SEO concernrs, you'll need a way to let google parse your content. So you'll need to build your pages server sides and not clientside.

For that you can for example use see https://prerender.io/ for example, that will preprocess your angular pages serverside

See also How to make a SPA SEO crawlable?

EDIT: Google seems to also execute javascript : http://ng-learn.org/2014/05/SEO-Google-crawl-JavaScript/ & http://googlewebmastercentral.blogspot.fr/2014/05/understanding-web-pages-better.html

Community
  • 1
  • 1
Jscti
  • 14,096
  • 4
  • 62
  • 87