All Projects → mariussoutier → Play Angular Require Seed

mariussoutier / Play Angular Require Seed

Licence: other
Seed Application for Playframework 2, RequireJS, WebJars, and AngularJS 1.x

Programming Languages

scala
5932 projects

Projects that are alternatives of or similar to Play Angular Require Seed

Angular Async Loader
Load modules and components asynchronously for angular 1.x application.
Stars: ✭ 137 (-19.41%)
Mutual labels:  requirejs, angularjs
Ng6 Starter
🆖 An AngularJS Starter repo for AngularJS + ES6 + Webpack
Stars: ✭ 1,933 (+1037.06%)
Mutual labels:  angularjs
Angular Promise Buttons
Chilled loading buttons for AngularJS
Stars: ✭ 156 (-8.24%)
Mutual labels:  angularjs
Biking2
This is the source code of http://biking.michael-simons.eu
Stars: ✭ 162 (-4.71%)
Mutual labels:  angularjs
Angular Ui Tour
Product tour using Angular UI Bootstrap Tooltips
Stars: ✭ 157 (-7.65%)
Mutual labels:  angularjs
Laravel Ecommerce
Laravel open source e-commerce system.
Stars: ✭ 163 (-4.12%)
Mutual labels:  angularjs
Serviceportal Widget Library
A collection of Service Portal custom widgets
Stars: ✭ 155 (-8.82%)
Mutual labels:  angularjs
Spring Boot Axon Sample
Sample application using Spring Boot, Axon, AngularJS and Websockets
Stars: ✭ 169 (-0.59%)
Mutual labels:  angularjs
Angular Validator
AngularJS form validation.
Stars: ✭ 164 (-3.53%)
Mutual labels:  angularjs
Ng I18next
translation for AngularJS using i18next
Stars: ✭ 161 (-5.29%)
Mutual labels:  angularjs
Ionic Toast
'ionic-toast' bower component for ionic framework applications
Stars: ✭ 160 (-5.88%)
Mutual labels:  angularjs
Playframework
Play Framework
Stars: ✭ 12,041 (+6982.94%)
Mutual labels:  playframework
Play Java Starter Example
Play starter project in Java (ideal for new users!)
Stars: ✭ 164 (-3.53%)
Mutual labels:  playframework
Ng Currency
Currency with AngularJS made easy!
Stars: ✭ 156 (-8.24%)
Mutual labels:  angularjs
Restdemo
RESTful Web Service Demos with Jersey ,Hibernate,Mysql,SQLserver,jQuery,AangularJS,Boostrap. (REST 案例大全)
Stars: ✭ 166 (-2.35%)
Mutual labels:  angularjs
Play Scala Isolated Slick Example
Example Play Slick Project
Stars: ✭ 155 (-8.82%)
Mutual labels:  playframework
Websdk Demo
本项目所有资源清单
Stars: ✭ 159 (-6.47%)
Mutual labels:  requirejs
Renren Aui
项目已迁移至rubik-admin。
Stars: ✭ 163 (-4.12%)
Mutual labels:  requirejs
Angular Js Es6 Testing Example
Enhanced testing of Angular JS 1.X applications using ES6 modules
Stars: ✭ 170 (+0%)
Mutual labels:  angularjs
Playbasics
Example code for my tutorial series about Play Framework 2.x
Stars: ✭ 168 (-1.18%)
Mutual labels:  playframework

Example application for Play+AngularJS+RequireJS.

Angular Version Note

Please note that this seed uses Angular 1.x and will not be updated for newer versions of Angular. I might create a new seed in the future, but personally I prefer using Scala.js with React.

Intro

This template application shows how to organize your application with Playframework 2, WebJars, RequireJS and AngularJS.

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.

Code Organization

The JavaScript modules are organized as follows:

|- app
|-- assets
|--- javascripts    <- contains all the JavaScript/CoffeeScript modules
|---- app.js        <- app module, wires everything together
|---- main.js       <- tells RequireJS how to load modules and bootstraps the app
|---- common/       <- a module, in this case
|----- main.js      <- main file of the module, loads all sub-files in this folder
|----- filters.js   <- common's filters
|----- directives/  <- common's directives
|----- services/    <- common's services
|---- ...

Trying It Out

Dev Mode

  • Load dependencies via sbt update
  • Run via sbt ~run
  • Go to localhost:9000

This uses the normal JavaScript files and loads libraries from the downloaded WebJars.

Prod Mode

Running:

  • Run sbt testProd

Deployment:

  • Produce executable via sbt clean dist
  • Extract unzip target/universal/play-angular-require-seed-2.x.x.zip
  • Run play-angular-require-seed-2.x.x/bin/play-angular-require-seed -Dhttp.port=9000 -Dconfig.resource=prod.conf

This uses the uglified JavaScript files, versioned and compressed assets, and loads WebJars resources from the jsDelivr CDN.

Activator

This application is also published as a Typesafe Activator template:

http://typesafe.com/activator/template/play-angular-require-seed

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
>

Enter 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
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].