2

I am using angularjs for load data from webservice. i am getting JSON data from webservices and bind it to html page using ng-repeat in angularjs directive.

After successfully page load when i right click of mouse on page and click on view page source.

It's not showing data getting from web services. I want to all data in view page source for SEO purpose. I find some article regarding SEO changes for angularjs website but it didn't help me to solve my problem.

Code snippets

 <div ng-app="mainApp">
        <div data-listing>
        </div>
    </div>

I am binding data from webservice in above div using angularjs directive. But in page soruce only above html is displaying.

Can you please suggest me the changes to display dynamic data in view page source.

Sam Peter
  • 71
  • 1
  • 9
  • Have a look at http://stackoverflow.com/questions/13499040/how-do-search-engines-deal-with-angularjs-applications – Shilly Dec 23 '16 at 10:02

1 Answers1

0

View Source is Server Side Not Client Side so Only one way you can achieve this to generate this code server side before the page is loaded at the client side. you can move the script to run before the page loads (but this is a guess and I am not sure if it will work).

Anurag K
  • 179
  • 2
  • 10