changed get_socket to getSocket (camelCase)
This commit is contained in:
parent
a2394e8e89
commit
c8113af0f2
|
@ -1,7 +1,7 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('insight.address').controller('AddressController',
|
||||
function($scope, $rootScope, $routeParams, $location, Global, Address, get_socket) {
|
||||
function($scope, $rootScope, $routeParams, $location, Global, Address, getSocket) {
|
||||
$scope.global = Global;
|
||||
|
||||
$scope.findOne = function() {
|
||||
|
@ -25,7 +25,7 @@ function($scope, $rootScope, $routeParams, $location, Global, Address, get_socke
|
|||
});
|
||||
};
|
||||
|
||||
var socket = get_socket($scope);
|
||||
var socket = getSocket($scope);
|
||||
socket.emit('subscribe', $routeParams.addrStr);
|
||||
socket.on($routeParams.addrStr, function(tx) {
|
||||
console.log('atx ' + tx.txid);
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('insight.system').controller('FooterController',
|
||||
function($scope, get_socket, Version) {
|
||||
function($scope, Version) {
|
||||
|
||||
var _getVersion = function() {
|
||||
Version.get({},
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('insight.system').controller('HeaderController',
|
||||
function($scope, get_socket, Global, Block) {
|
||||
function($scope, getSocket, Global, Block) {
|
||||
$scope.global = Global;
|
||||
|
||||
$scope.menu = [
|
||||
|
@ -15,7 +15,7 @@ angular.module('insight.system').controller('HeaderController',
|
|||
}
|
||||
];
|
||||
|
||||
var socket = get_socket($scope);
|
||||
var socket = getSocket($scope);
|
||||
socket.emit('subscribe', 'inv');
|
||||
|
||||
var _getBlock = function(hash) {
|
||||
|
|
|
@ -4,7 +4,7 @@ var TRANSACTION_DISPLAYED = 5;
|
|||
var BLOCKS_DISPLAYED = 5;
|
||||
|
||||
angular.module('insight.system').controller('IndexController',
|
||||
function($scope, $rootScope, Global, get_socket, Blocks, Block, Transactions, Transaction) {
|
||||
function($scope, $rootScope, Global, getSocket, Blocks, Block, Transactions, Transaction) {
|
||||
$scope.global = Global;
|
||||
|
||||
var _getTransaction = function(txid) {
|
||||
|
@ -23,7 +23,7 @@ angular.module('insight.system').controller('IndexController',
|
|||
});
|
||||
};
|
||||
|
||||
var socket = get_socket($scope);
|
||||
var socket = getSocket($scope);
|
||||
socket.emit('subscribe', 'inv');
|
||||
|
||||
//show errors
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('insight.status').controller('StatusController',
|
||||
function($scope, $routeParams, $location, $rootScope, Global, Status, Sync, get_socket) {
|
||||
function($scope, $routeParams, $location, $rootScope, Global, Status, Sync, getSocket) {
|
||||
$scope.global = Global;
|
||||
|
||||
$scope.getStatus = function(q) {
|
||||
|
@ -36,7 +36,7 @@ function($scope, $routeParams, $location, $rootScope, Global, Status, Sync, get_
|
|||
});
|
||||
};
|
||||
|
||||
var socket = get_socket($scope);
|
||||
var socket = getSocket($scope);
|
||||
socket.emit('subscribe', 'sync');
|
||||
socket.on('status', function(sync) {
|
||||
console.log('[status.js.55::] sync status update received!');
|
||||
|
|
|
@ -46,7 +46,7 @@ ScopedSocket.prototype.emit = function(event, data, callback) {
|
|||
});
|
||||
};
|
||||
|
||||
angular.module('insight.socket').factory('get_socket',
|
||||
angular.module('insight.socket').factory('getSocket',
|
||||
function($rootScope) {
|
||||
var socket = io.connect();
|
||||
return function(scope) {
|
||||
|
|
Loading…
Reference in New Issue