Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot get all my pages indexed #22

Open
arnauddri opened this issue Dec 2, 2014 · 2 comments
Open

Cannot get all my pages indexed #22

arnauddri opened this issue Dec 2, 2014 · 2 comments

Comments

@arnauddri
Copy link

Hi,

Thanks for making this tool. I am trying to use it to index my app but somehow I can only get the homepage indexed.

As I am not using hashbangs, I've added the following meta tag to my app's header:

<meta name="fragment" content="!" />

In my main controller, I trigger $scope.htmlReady when the content is fully loaded:

  $scope.$on('$viewContentLoaded', function() {
    $scope.htmlReady();
  });

I have loaded the seo module properly and while my server's app listens on port 4000 (I use an express server), I launch phantomJS on port 4040 with the following command:

phantomjs --disk-cache=no ./bin/angular-seo-server.js 4040 http://127.0.0.1:4000

If I check how things are working for the homepage with a simple curl 'http://127.0.0.1:4040/?_escaped_fragment_=' I get the correct HTML rendered properly.

But if I try a different route like http://127.0.0.1:4040/test?_escaped_fragment_= I only get html <html><head></head><body></body></html> while http://127.0.0.1:4000/test works fine.

How can I make sure all my pages are indexed and not only my homepage?

@arnauddri
Copy link
Author

I tried running

phantomjs --disk-cache=no ./bin/angular-seo-server.js 4040 http://127.0.0.1:4000/test 

It works to serve my /test page. However I have pages like http://www.mywebsite.com/product/:product_id

How can I index them all?

@cruvitaDev
Copy link

@arnauddri did you ever figure this out?

I added $scope.htmlReady(); to each place my dynamic code injects the proper content into the scope on each of my dynamic pages I want spidered. similarly, when i curl the URL, all i Get back is the content of my index.html page, and not the HTML content that should be inside my ng-view.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants