javascript - Raw AngularJs markup appearing in Google search results page -
We only update parts of our website with AngularJS - especially the login page. When I look at search results in Google, the cached page and small snippet appear that it is automatically raw connor markup, so lots of {{model.username}}
, {{Model errorMessage}}
, etc.
I will not link to the results because it is very embarrassing
It would be great if you have any embarrassment to test any thing for all of us Samudha Turn it into service, because you are seeing a situation that some people accept or want to reproduce themselves. :)
Google is relatively (or too much, you ask It is good to ignore the hidden content, they apply back in such a way when people used to use the blocks to use the contents of keyword-content that were set to "Display: None" Or small / Unreadable / white-on-white fonts.
Seeing again is a problem for more than SEO, so I am suggesting that things like Prior .io are great, but they Only solve a piece. What about users only are slow browsers? Well, it has come to know that this is a big solution for the called ngCloak
, this template wraps things like material content (ngModel mapping and binding, expression, etc.) until the fingers themselves Do not be ready to fill.
It is very easy to implement; You need a small block of CSS (embedded in the initial loaded file, or directly in your HTML page):
[ng \: cloak], [ng-cloak] , [Data -ng-cloak], [x-ng-cloak], .ng-cloak, .x-ng-cloak {display: none! Important; }
and then implement the ngCloak
instructions for things you are affecting, or for high-level parents (like your NG-visual DIV) :
& lt; Div id = "wrapper" ng-cloak & gt; & Lt ;! - Page content here - & gt; & Lt; / Div & gt;
This works like a non-JS target, but specifically for AngularJS.
/ P>
Comments
Post a Comment