Scanning ng-view in angular js

I am developing a static website in AngularJS and I am stuck on an SEO issue. Basically my google webmaster tools say there are no workaround errors, but when I try to find different routes, it always returns the same homepage result. It doesn't read what is injected into the ng-view div. It just shows static text in my index.html file. The weird thing is that it actually reads my '/' landing page directive because when it displays it, it reads my nav, footer and content that I put in the "index-widget" directive, but as I said, it reads nothing from the ng-view directive. Any help would be greatly appreciated. Here is the page http://luxtest.tk Thanks

0


source to share


1 answer


Your site uses # urls (for example http://luxtest.tk/#/kontakti ) - Google bot won't see them as separate pages. You have two options:



Getting into HTML5 mode is easier if you can configure your hosting appropriately to include the entire url in the index.html page. The transition to HTML5 mode is done in the configuration for the application:

    angular.module('test', [])

        .config(function($locationProvider) {
            // use the HTML5 History API
            $locationProvider.html5Mode(true);
        });

      

+1


source







All Articles