Cleaning controllers. Also call connect socket-ii in all pages. Everything work!
This commit is contained in:
parent
5d83d180da
commit
8ab479691d
6 changed files with 68 additions and 46 deletions
|
|
@ -1,13 +1,15 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copay.backup').controller('BackupController',
|
||||
function($scope, $rootScope, $location) {
|
||||
function($scope, $rootScope, $location, Socket, controllerUtils) {
|
||||
|
||||
|
||||
if (!$rootScope.wallet.id) {
|
||||
if (!$rootScope.wallet || !$rootScope.wallet.id) {
|
||||
$location.path('signin');
|
||||
}
|
||||
|
||||
else {
|
||||
var socket = Socket($scope);
|
||||
socket.on('connect', controllerUtils.handleTransactionByAddress($scope));
|
||||
}
|
||||
|
||||
$scope.title = 'Backup';
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue