Created
February 6, 2015 18:47
-
-
Save aldesantis/2e9f30aaf906e7c14caf to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
angular.module('controllers', []).controller('SessionsController', ['$scope', '$translate', | |
($scope, $translate)-> | |
$scope.labels = [] | |
$translate(['models.user.labels.email', 'models.user.labels.password']).then( | |
(translations)-> | |
$scope.foo = 'bar' | |
$scope.labels = translations['models.user.labels.email'] | |
console.log 'promise resolved' | |
) | |
console.log $scope.test | |
$scope.loginFormSchema = { | |
type: 'object', | |
properties: { | |
email: { | |
type: 'string', | |
title: $scope.labels['models.user.labels.email'] | |
}, | |
password: { | |
type: 'string', | |
title: $scope.labels['models.user.labels.password'], | |
'x-schema-form': { | |
type: 'password' | |
} | |
} | |
}, | |
required: ['email', 'password'] | |
} | |
$scope.loginForm = [ | |
'*', | |
{ | |
type: 'submit', | |
title: 'Sign in', | |
style: 'btn btn-lg btn-primary' | |
} | |
] | |
$scope.login = {} | |
]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment