我当前的 html 如下所示:
<title ng-bind="title">Loading</title>
<meta name="description" content="[[description]]">
<base href="/">
<meta name="fragment" content="!">
angular.js 配置:
$locationProvider.html5Mode(true);
$locationProvider.hashPrefix('!');
我认为让 googlebot 正确索引站点就足够了。但是不,它没有采用正确的标题或描述。如果我运行“fetch as googlebot”网站正确呈现。我该怎么办?
最佳答案
我认为您不再需要为 Google 抓取工具预呈现您的页面。不久前,它开始注意到 javascript 的变化。
我实际上已经回答了关于 AngularJS seo that will help you here: 的问题
在上面的链接上寻找我的答案。我还提供了一个可能对您有用的指令。
顺便问一下,你确定你正确使用了 angularjs 表达式吗?您有使用 [[]] 的描述,通常是 {{}}
关于javascript - angular.js seo - 谷歌索引,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32394043/