Can we use angular2 universal with server side JAVA

RohanB picture RohanB · Jun 8, 2016 · Viewed 8k times · Source

I have an web project which is using angular 2 on front end and java spring 4 on server side. I am somewhat new to angular 2. I wanted to use angular universal for prerendering. How can i able to achieve it?

is there any tutorial which explains it with Java on server side?

Is there any other library that will help me out?

Answer

Kamal picture Kamal · Aug 15, 2017

Fortunately their's a library (Angularj-Universal) or a solution for rendering Angular4 applications on the server side (Spring Boot or Java EE) and sending them to the browser as 'already-bootstraped' application.

Angularj-Universal library is a server side rendering for Spring Boot and Angular4 based on the J2V8 library, also you can implement your own render implementation.

On the home page of this project you will find a useful guides step-by-step on how to create angular application from scratch and integrate it with Spring Boot using @angular/cli