Angular Universal with Ionic 2


#1

Hi Guys, we have developed PWA in ionic2 but struggling with SEO. We are trying to integrate Angular Universal to render it on server side. Has anybody tried it? any pointers to starter project?


#4

Hi Guys, did you find a solution ?


#5

Did you have any luck with Angular Universal and Ionic 2? This is something we’d like to try also. Scotch.io has a nice recent post on Angular Universal but I haven’t found anyone doing it with Ionic yet.


#6

No we have not! We are really new to javascript world so could not even get started. Hoping to get some answers by experts!


#7

Hi Guys,
Angular universal is mergin into Angular core ! (https://github.com/angular/universal/blob/master/README.md).
Do ionic have a roadmap for this subject ?


#8

I followed up with Adrian and there is no working solution here. Maybe Universal support will get added to the roadmap in the future.


#9

Thanks everyone. I’d guess that search engine discover-ability is a pretty common app requirement, so here’s hoping that this lands before too long. Two points:
First, if you, like me, are in the early stages of app planning and dev, it seems like a good idea to simply build like normal, but keep code ready for possible isomorphic deployment down the road. ie. avoid any use of window, document, etc.:

// Note: Only interact with the DOM through renderer. Instead of getElementById: 
renderer.setElementAttribute(element.nativeElement, 'testAttr', '12');  

And second, looking quickly at the Angular github, it seemed that Universal will be merged into Angular 4.0.0. can anyone confirm? this sounds to me like breaking changes that would take a long time to finally get shipped in ionic…
cheers!


#10

I think it will take some time for the universal to be merged and then shipped into ionic. I’ve been waiting for universal for a while now but at this point universal is just stuck with lower android version. Means even if we try to use universal we cant use latest angular ionic uses right now.


#11

"We were able to get all the changes for Universal API in time for beta.8! "


#12

I’ve been looking for a solution but universal does not seems supported yet.
Any news here?


#13

I will do my best to try to make an isomorphic application in ionic running in angular direct, if I can, i will tell you how.