identity now emits!

This commit is contained in:
Matias Alejo Garcia 2014-11-30 00:31:17 -03:00
commit 3ae6378678
33 changed files with 376 additions and 346 deletions

View file

@ -22,7 +22,19 @@ angular.module('copayApp.controllers').controller('HomeController', function($sc
$scope.error = 'Please enter the required fields';
return;
}
identityService.open($scope, form);
$rootScope.starting = true;
identityService.open(form.email.$modelValue, form.password.$modelValue, function(err) {
$rootScope.starting = false;
if (err) {
copay.logger.warn(err);
if ((err.toString() || '').match('PNOTFOUND')) {
$scope.error = 'Invalid email or password';
} else {
$scope.error = 'Unknown error';
}
$rootScope.$digest()
}
});
}
function getParam(sname) {