check if there is not profile, to redir

This commit is contained in:
Matias Alejo Garcia 2014-10-11 08:43:51 -03:00
commit b03a3f1391
9 changed files with 52 additions and 28 deletions

View file

@ -1,9 +1,18 @@
'use strict';
angular.module('copayApp.controllers').controller('HomeController', function($scope, $rootScope, $location, notification, controllerUtils, pluginManager) {
controllerUtils.redirIfLogged();
$scope.retreiving =true;
copay.Identity.anyProfile({
pluginManager: pluginManager,
}, function(any) {
$scope.retreiving =false;
if (!any)
$location.path('/createProfile');
});
$scope.openProfile = function(form) {
if (form && form.$invalid) {
notification.error('Error', 'Please enter the required fields');