$q.all([ promise1, promise2 ]).then($q.spread(function (promise1Result, promise2Result) {
});
| .state("items.add", { | |
| url: "/add", | |
| onEnter: function($stateParams, $state, $dialog, $resource) { | |
| var Item = $resource(...); | |
| $dialog.dialog({ | |
| keyboard: true, | |
| templateUrl: "items/add", | |
| backdropClick: false, |
| 'use strict'; | |
| angular.module('app').directive('ngBindHtmlUnsafe', function ($sce) { | |
| return { | |
| constrain: 'E', | |
| link: function (scope, element, attr) { | |
| scope.$watch($sce.parseAsHtml(attr.ngBindHtmlUnsafe), function(value) { | |
| element.html(value || ''); | |
| }); | |
| } |
| { | |
| "directory": "bower_components", | |
| "json": "bower.json" | |
| } |
| $stateProvider.state('main', { | |
| abstract: true, | |
| url: '/:account', | |
| resolve: { | |
| auth: function ($q, $state, $stateParams, $location, AccountRepo, Security) { | |
| return AccountRepo.auth().then(function (user) { | |
| // If not logged in redirect to login with path preserved | |
| if (user === false) { | |
| $state.go('account.login', {redirect: $location.url()}); | |
| return $q.reject('not logged in'); |
| import sbt._ | |
| import Keys._ | |
| import java.net._ | |
| import java.io.File | |
| import play.PlayRunHook | |
| /* | |
| Grunt runner should be in project directory to be picked up by sbt | |
| */ | |
| object Grunt { |
| /* | |
| grunt task that calls bower install with --force-latest | |
| simply call 'bower' from a registerTask. | |
| grunt.registerTask('install', [ | |
| 'clean', | |
| 'bower', | |
| 'bower_postinst' // good grunt plugin if you want to build something from sources, in my case I'm building angular-bootstraps 3.0.0 branch | |
| ]); | |
| */ |
| package actions | |
| import play.api.mvc._ | |
| import scala.concurrent.{ExecutionContext, Future} | |
| import javax.persistence._ | |
| import play.db.jpa.JPAPlugin | |
| import play.api.Play | |
| import play.api.mvc.SimpleResult | |
| class EntityManagerRequest[A](val em: EntityManager, request: Request[A]) extends WrappedRequest[A](request) |
| # | |
| # - install jdk8 from oracle | |
| # | |
| RUN apt-get install -y python-software-properties software-properties-common | |
| RUN add-apt-repository ppa:webupd8team/java | |
| RUN apt-get update | |
| RUN echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | /usr/bin/debconf-set-selections | |
| RUN apt-get install -y oracle-java8-installer |