Wallet/js/controllers/createProfile.js
Matias Alejo Garcia 3ae6378678 identity now emits!
2014-11-30 22:41:21 -03:00

21 lines
603 B
JavaScript

'use strict';
angular.module('copayApp.controllers').controller('CreateProfileController', function($scope, $rootScope, $location, notification, pluginManager, identityService) {
identityService.goWalletHome();
$scope.loading = false;
$scope.createProfile = function(form) {
if (form && form.$invalid) {
$scope.error('Error', 'Please enter the required fields');
return;
}
identityService.create(
form.email.$modelValue, form.password.$modelValue, function(err) {
if (err) $scope.error('Error', err.toString());
$rootScope.$digest();
});
}
});