Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
<meta charset="utf-8"> | ||
<title>My AngularJS App</title> | ||
<link rel="stylesheet" href="@routes.Assets.at("css/app.css")"> | ||
@Html(org.webjars.play.RequireJS.setup("js/app")) | ||
<script data-main="js/main" src="@routes.Assets.at("lib/requirejs/require.js")"></script> | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
huntc
Author
Owner
|
||
</head> | ||
<body> | ||
<ul class="menu"> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,13 +3,8 @@ name := "angular-seed-play" | |
version := "1.0-SNAPSHOT" | ||
|
||
libraryDependencies ++= Seq( | ||
"org.webjars" %% "webjars-play" % "2.2.1-2", | ||
"org.webjars" % "angularjs" % "1.2.13" | ||
"org.webjars" % "angularjs" % "1.3.0-beta.2", | ||
"org.webjars" % "requirejs" % "2.1.11-1" | ||
) | ||
|
||
play.Project.playScalaSettings | ||
|
||
requireJs += "app.js" | ||
|
||
requireJsShim += "app.js" | ||
|
||
lazy val root = (project in file(".")).addPlugins(PlayScala) | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
huntc
Author
Owner
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
sbt.version=0.13.0 | ||
sbt.version=0.13.5-M2 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,35 @@ | ||
/*global define, angular */ | ||
/*global require, requirejs */ | ||
|
||
'use strict'; | ||
|
||
requirejs.config({ | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
huntc
Author
Owner
|
||
paths: { | ||
'angular': ['../lib/angularjs/angular'], | ||
'angular-route': ['../lib/angularjs/angular-route'] | ||
}, | ||
shim: { | ||
'angular': { | ||
exports : 'angular' | ||
}, | ||
'angular-route': { | ||
deps: ['angular'], | ||
exports : 'angular' | ||
} | ||
} | ||
}); | ||
|
||
require(['angular', './controllers', './directives', './filters', './services', 'angular-route'], | ||
function(angular, controllers) { | ||
|
||
// Declare app level module which depends on filters, and services | ||
|
||
angular.module('myApp', ['myApp.filters', 'myApp.services', 'myApp.directives', 'ngRoute']). | ||
config(['$routeProvider', function($routeProvider) { | ||
$routeProvider.when('/view1', {templateUrl: 'partials/partial1.html', controller: controllers.MyCtrl1}); | ||
$routeProvider.when('/view2', {templateUrl: 'partials/partial2.html', controller: controllers.MyCtrl2}); | ||
$routeProvider.otherwise({redirectTo: '/view1'}); | ||
}]); | ||
}]); | ||
|
||
angular.bootstrap(document, ['myApp']); | ||
|
||
}); |
This should be a versioned URL.