AngularJS - server-side rendering

前端 未结 10 2191
梦谈多话
梦谈多话 2020-12-07 10:57

As you may know, AirBnb opensourced Rendr (http://nerds.airbnb.com/weve-open-sourced-rendr) which should enable server-side rendering of Backbone a

相关标签:
10条回答
  • 2020-12-07 11:53

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

    wiki for details

    Update from author of that repo: that was about 6 years ago (at the time of this edit). At this point, people should probably be using https://angular.io/guide/universal or just https://prerender.io/

    0 讨论(0)
  • 2020-12-07 11:53

    I'm searching for a solution too. But it's not an option to use browser to render the html on the server and send it to the frontend. Airbnb try it first but rejected because is slow and resource hungry. It's not a production solution.

    Update: This soon can be possible with the introduction of Object.observe ;)

    0 讨论(0)
  • 2020-12-07 11:55

    This new package https://github.com/a-lucas/angular.js-server allows you to pre-render an Angular application and send HTML to the client, that will then execute the jS code.

    It supports caching per url and you can define rules to activate URL pre-rendering.

    PS: I am the main contributor for this package.

    0 讨论(0)
  • 2020-12-07 11:56

    i Hope it could still help somone, but here is an npm package I have created:

    https://www.npmjs.com/package/ng-node-compile

    0 讨论(0)
提交回复
热议问题