Is support for server-side-rendering / angular-universal on the roadmap?
Right now the Ionic framework is tightly coupled with the DOMrenderer (it loads dom.js where it expects a window object).
This causes problems when I want to use angular-universal to render a page using node.
I want to see this!
can ionic2 live with express and angular-universal.
It is something that we’re looking into.
It does introduce some question on where it fits in with cordova apps, but it’s seems like something we need to get to work with PWA.
Expect to see some more info as time goes on!
thanks for answer!
Someday , try to implement .
First off, @max you guys are doing terrific work taking care of issues promptly and properly! Thanks.
I’m just curious have y’all made any progress on incorporating Universal?
Best!
With so many changes in RC0, do you know if it still has DOM dependencies that are an issue with Angular Universal? Thinking about giving this a try and just wondering if there any updates on future Universal support for PWA. Thanks
I’m currently looking into this. I would appreciate if anyone has looked into this might point me to an example repo outside the universal starter.
Looks like universal is not possible atm. Looks like hammer.ts uses window atm. Going to play and see what workarounds I can try and make.
Really interested to see if there’s a solution here. Just speculating but I wonder
-
even though hammer.ts uses window, what happens when running NG Universal (because it contains mocks for objects like the window according to https://github.com/angular/universal/issues/282), and
-
if using server-side DOM implementation like https://www.npmjs.com/package/jsdom might be part of a workaround or if better to wait for direction / support from Ionic team
It’s hard to say how Ionic would handle the run-time transition from server to client, and what browser-side calls might need to be re-made after everything is loaded. Good luck on the R+D!
Thanks for giving me these references. I haven’t looked into universal too much since I hit those setbacks but will take a better look to see whats up. I’ve been hoping that lazy loading and possibly the closure compiler can bring the package size down enough to make a difference for me short term for performance. Also looking into prerender.io for seo and google crawler capabilities.
Looks like there is work being done to handle it in this issue. https://github.com/angular/universal/issues/534
HI Alex, have you tried Angular Universal with Ionic2. We are trying but not getting it working. Its not even building (considering our poor knowledge on javascript based frameworks). Is there any starter project for Ionic2 with universal. It would be a great help!