javascript - How to use server-side rendering in Angular 2? -
i have web app developed angular 2 communicates java apis on server fetch data. working fine except pages not indexed search engine (except google supports script generated tags).
i've googled lot , found can achieved "server side rendering" , there libraries available achieve of these commercial products require payment.
i have come across angular universal not commercial product, can use solve our issue? if can how can hook our existing app?
you on right path there 2 ways achieve objective
if using @angular/cli developing angular app can follow link
if developing own webpack.config file there lot of options available, best of them universal-starter , featued in official documentation of angular/universal
while continuing @angular/cli, there little caveat doesn't support lazy loading yet working on , future bright @angular/cli. if want implement lazy loading suggest go ahead second option.
Comments
Post a Comment