Play Angular Require Seed Updates

This is just a short post illustrating the latest updates in my Play-Angular-RequireJS Seed.

Play 2.4

The biggest obvious change is the update to the latest version of the Playframework, 2.4. Play 2.4 offers several ways of using Dependency Injection. In my opinion, a Scala project should aim to use compile-time DI, so the seed uses exactly that. It’s simple to use, type-safe, and eliminates a lot of global state. If you prefer using Guice or any other runtime DI mechanism, it shouldn’t be too hard to change that.

This is also means the seed now uses the injected router, and controllers are no longer objects but classes that get instantiated in AppLoader, which replaces Global.

Other Dependencies

Angular is now at version 1.4 (it’s hard to keep up-to-date with latest minor version though). RequireJS, Underscore, and so on have been updated as well.

Mucki Seiler updated Bootstrap to 3.3.5, and also added two new base LESS files that make it super easy to change Bootstrap’s layout and colors.

The seed now also uses JodaDate instead of java.util.Date, which you should do in all of your projects.

Thanks go out to all the other pull requests for version updates!

Project Setup

I’ve added a really helpful compiler flag I recently discovered, -Xcheckinit. It helps you track down initialization problems when mixing many traits, which is typical when using the cake pattern. And since Play 2.4 requires Java 8, the target JVM is now 1.8.

Resolvers now use https instead of http. Make sure to update this in all of your projects, otherwise you are running at a serious security risk!

Missing Features

If you have anything that’s missing from the seed, please open a GitHub issue.

Using it

As usual, the easiest way to get started is to create a new project using Activator by typing activator new and then enter play-angular-require-seed as the template. In the newly created project, look for all the TODO you have to fill or change.

Stay Up-to-date

Finally, if you’re interested in receiving news about the blog and about the seed, please sign up for my newsletter. I’m also planning to release a “Pro” version of the seed in the future.

2 comments on “Play Angular Require Seed Updates
  1. Ricardo says:

    Hi, I’m using your seed and is working terrific. I have been playing with the project but I still can’t configure it to use pretty URLS. When I configure Angular to use HTML5 history, play framework stops resolving the URLs. ¿Any Ideas?

  2. Diego says:

    Why, When I use the command “stage” and runs the app, I don´t see the javascripsts minified in Chrome\Source.

Leave a Reply

Your email address will not be published. Required fields are marked *


Time limit is exhausted. Please reload CAPTCHA.

This site uses Akismet to reduce spam. Learn how your comment data is processed.