Cleaning controllers. Also call connect socket-ii in all pages. Everything work!

This commit is contained in:
Gustavo Cortez 2014-04-17 13:25:36 -03:00
commit 8ab479691d
6 changed files with 68 additions and 46 deletions

View file

@ -1,13 +1,17 @@
'use strict';
angular.module('copay.send').controller('SendController',
function($scope, $rootScope, $location) {
function($scope, $rootScope, $location, Socket, controllerUtils) {
$scope.title = 'Send';
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.sendTest = function() {
var w = $rootScope.wallet;