Example application for Play+AngularJS+RequireJS.
It shows an alternative way of organizing modules than the official Angular-Play-Seed.
For a full explanation, read the following blog post: http://www.mariussoutier.com/blog/2013/08/25/requirejs-optimization-play-webjars/
The updates made for Play 2.2 and newer WebJars are explained here: http://www.mariussoutier.com/blog/2014/03/25/requirejs-optimization-play-2-2-webjars-cdns/
The changes for Play 2.3 and sbt-web are discussed in this series about sbt-web: http://mariussoutier.com/blog/2014/10/20/intro-sbt-web/
The changes for Play 2.4 are summarized in this short summary post: http://mariussoutier.com/blog/2015/07/25/play-angular-require-seed-updates/
Updated for Play 2.5 with only a few minor changes.
Trying It Out
- Load dependencies via
- Run via
- Go to localhost:9000
- Produce executable via
sbt clean dist
play-angular-require-seed-2.x.x/bin/play-angular-require-seed -Dhttp.port=9000 -Dconfig.resource=prod.conf
This application is also published as a Typesafe Activator template:
To use it from Activator, type
$ activator new <project-name>
Activator will now ask you to choose a template:
Browse the list of templates: http://typesafe.com/activator/templates Choose from these featured templates or enter a template name: 1) minimal-java 2) minimal-scala 3) play-java 4) play-scala >
play-angular-require-seed (you can use tab completion).
> play-angular-require-seed OK, application "<project-name>" is being created using the "play-angular-require-seed" template.
Your new app is now ready for development. Switch to its directory and run activator or sbt.
$ cd <project-name> $ activator ~run