How to integrate Angular in Play Framework(Java) project…

Lahiru Ariyasinghe
2 min readDec 23, 2020

In my last story I have discussed about How Install the Play Framework and Open new Project with IntelliJ IDE. After you have done it successfully, you can integrate the Angular to your modern web application by following next steps.

Play is a high velocity web framework for Scala and Java languages. It is based on a stateless, lightweight, developer-friendly architecture and follows MVC architecture patterns and principles. Angular an application design framework and development platform for creating efficient and sophisticated single-page apps. A lot of developers are working with Angular and how flexible it makes developing robust web/mobile application front-ends.

In this story, we will take a journey at how we can integrate and use Angular and Play(Java) Framework to build a web application with the IntelliJ IDE.

1. Download/Clone the initial project form GitHub

First we want to download the project repository from here : https://github.com/yohangz/java-play-angular-seed

2. Update sbt and load all components

After you extract it where ever you want, you must delete the two sbt files(sbt and abt.bat file) inside the project. Then you need to update the sbt inside your extracted project directory using the command : sbt update. It will download the all components which you want in front-end and the back-end.

3. Run the project

Then you can execute three commands as following to compile and run the project.

1. sbt

2. compile

3. run

Then you can see the project will run automatically on your browser as follows. https://localhost:4200/play

Conclusion

This story shows you how integrate the Angular with the play framework project on your web application. Please feel free to ask any question you will face in response section below. Or connect me on LinkedIn.

https://www.linkedin.com/in/lahiru-ariyasinghe-b43477131

Found this post useful? Kindly tap the 👏 button below! :)

--

--