在服务器端 asp.net 上进行 angularjs 渲染

问题描述 投票:0回答:1

我使用 angularjs 框架作为前端,使用 asp net mvc 作为后端来开发我的网络应用程序。

如你所知,AngularJS 在 SEO 方面有一个重大缺陷。有一些解决方案,例如使用 phantomjs 创建网站快照并将其提供给搜索机器人而不是原始网站。但我不喜欢那样。我最近介绍了同构 Web 应用程序的概念,如果我没有记错的话,可以在服务器上预渲染 AngularJS 应用程序,然后将渲染的 html 提供给客户端。

我找到的所有解决方案都是针对其他框架的。就像 Rendr (https://github.com/rendrjs/rendr) 或 angularjs-server (https://github.com/saymedia/angularjs-server)。还有一个名为 NodeServices 的库(https://github.com/aspnet/NodeServices)可以实现这一点,但它是用 Asp.net core 和 Angular 2 universal 编写的,我都没有使用它们。有没有库为 ASP.NET 和 Angular 做同样的工作?

asp.net angularjs seo isomorphic-javascript rendr
1个回答
-1
投票

如这里所述搜索引擎如何处理AngularJS应用程序?

Google 现在在抓取网络时执行 JavaScript。问题是,没有标准,您不能假设任何搜索引擎在客户端呈现时都会正确抓取您的 Web 应用程序。

© www.soinside.com 2019 - 2024. All rights reserved.