AngularJS - 服务器端渲染 [英] AngularJS - server-side rendering

查看:1344
本文介绍了AngularJS - 服务器端渲染的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

正如你可能知道,制作的Airbnb opensourced Rendr(<一个href=\"http://nerds.airbnb.com/weve-open-sourced-rendr\">http://nerds.airbnb.com/weve-open-sourced-rendr)应使服务器端渲染 骨干的应用程序。这是很酷的,因为我们可以在服务器上运行的模板渲染的第一个循环,并在客户端被完全渲染HTML文档加上整个JS应用程序,这大大减少了时间到显示屏和可以让我们摆脱其他的服务器端模板系统。

As you may know, AirBnb opensourced Rendr (http://nerds.airbnb.com/weve-open-sourced-rendr) which should enable server-side rendering of Backbone apps. This is cool, because one can run the first "iteration" of template rendering on the server and the client gets fully rendered HTML document plus the whole JS app. It greatly reduces time-to-display and can get us rid of other server-side templating systems.

因此​​,有专人管理,以渲染jsdom或ZombieJS AngularJS?对Node.js的这些DOM /浏览器仿真在理论上应该是足够简单的服务器端角模板,但结果我发现Google上搜寻它不是非常确凿的。

So, have someone managed to render AngularJS with jsdom or ZombieJS? These dom/browser emulations on Node.js should in theory be enough for simple server-side Angular templating, but results I found googling it were not very conclusive.

推荐答案

下面是另一种解决办法:<一href=\"https://github.com/ithkuil/angular-on-server\">https://github.com/ithkuil/angular-on-server

Here is another solution: https://github.com/ithkuil/angular-on-server

<一个href=\"https://github.com/ithkuil/angular-on-server/wiki/Running-AngularJS-on-the-server-with-Node.js-and-jsdom\">wiki详情

这篇关于AngularJS - 服务器端渲染的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆