AngularJS SEO - Once and for all

0 votes

I'm in a big project with 15 sub sites and 13 different schema pages. Currently, the site is based on ui.route for all pages and my data set by $http angular request. After tests and trials on search console its looks like google don't see all my pages except the home page and data from $http request don't showing up. What I'm doing wrong

my app config 

function createState(name) {
    return {
        url: '/' + name + '/:id',
        templateUrl : 'templates/pages/' + name +'.html',
        controller : 'singlePage',
        resolve: {
           pageData: function(getData, $stateParams) {
                var params = $stateParams;
                params.type = this.self.name;
                return getData.getPageData(params.type, params)
           }
        }
    }
}
.state('info', createState('info'))
.state('news', createState('news'))
.state('event', createState('event'))

$urlRouterProvider.otherwise('/');
$locationProvider.html5Mode(true);

Feb 13 in Others by Kichu
• 19,040 points
27 views

1 answer to this question.

0 votes

java script cant be or wont be compiled by googlebots and ui-router wont work when url is crawled by googlebots it will 
only get index page of the site you can use phantomjs to load the angular app and get the html compiled
for the bots 

<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">
 <url>
  <loc>http://example.com/</loc>
 </url>
 <url>
  <loc>http://example.com/anotherside/</loc>
 </url>
 <url>
  <loc>http://example.com/search/param1/param2</loc>
 </url>
</urlset> 


this is working use this as a reference
answered Feb 14 by narikkadan
• 10,840 points

Related Questions In Others

0 votes
0 answers

Replacing H1 text with a logo image: best method for SEO and accessibility?

i want to link my logo to ...READ MORE

Feb 14 in Others by Kichu
• 19,040 points
653 views
0 votes
1 answer

Rendertron for NuxtJS and Firestore site for SEO purposes

reconfigue the server setting  app.use(rendertron.makeMiddleware({ proxyUrl: 'https://ampedcast-7c1d6.uc.r.appspot.com/render', ...READ MORE

answered Feb 21 in Others by narikkadan
• 10,840 points
111 views
0 votes
1 answer

Replacing H1 text with a logo image: best method for SEO and accessibility?

<h1> <a href="http://stackoverflow.com"> ...READ MORE

answered Feb 21 in Others by narikkadan
• 10,840 points
20 views
0 votes
1 answer

Limit the size of the existing and new permalink slugs in Wordpress for SEO

?php   /**  * Trim native slugs  */ function pm_trim_native_slug($slug, $post_ID, ...READ MORE

answered Feb 25 in Others by narikkadan
• 10,840 points
167 views
0 votes
0 answers

Angular and SEO indexing

app.config(["$routeProvider", function($routeProvider) { $routeProvider .when("/", ...READ MORE

Feb 14 in Others by Kichu
• 19,040 points
17 views
+1 vote
1 answer

What is the relationship between angularjs Scope with controller/view?

Let us consider the below block: <div ng-controller="emp"> ...READ MORE

answered Jan 20, 2020 in Web Development by Niroj
• 82,720 points

edited Jan 21, 2020 by Niroj 391 views
+1 vote
1 answer

What is css box module?

Hey, All the element present in html follows ...READ MORE

answered Jan 20, 2020 in Web Development by Niroj
• 82,720 points

edited Jan 21, 2020 by Niroj 447 views
0 votes
3 answers

Explain the difference between visibility:hidden; and display:none?

display:none means that the tag in question will ...READ MORE

answered Dec 14, 2020 in Web Development by Gitika
• 65,850 points
78,793 views
0 votes
1 answer

AngularJS SEO - Once and for all

javascript is not compiled by google bots ...READ MORE

answered Feb 20 in Others by narikkadan
• 10,840 points
43 views
0 votes
1 answer

All in one seo pack and qtranslate title attributes

try changing one of the plugins and ...READ MORE

answered Feb 17 in Others by narikkadan
• 10,840 points
17 views
webinar REGISTER FOR FREE WEBINAR X
Send OTP
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP