ethstats-server/src/js/app.js

46 lines
1.0 KiB
JavaScript
Raw Normal View History

2015-01-20 19:29:31 +01:00
'use strict';
2015-05-12 17:02:51 +02:00
/* Init Angular App */
2015-02-05 11:08:06 +01:00
var netStatsApp = angular.module('netStatsApp', ['netStatsApp.filters', 'netStatsApp.directives', 'ngStorage']);
2015-05-12 17:02:51 +02:00
2019-02-18 16:48:15 +01:00
netStatsApp.run(function($rootScope) {
$rootScope.networkName = networkName || 'Ethereum';
$rootScope.faviconPath = faviconPath || '/favicon.ico';
});
2015-05-12 17:02:51 +02:00
/* Services */
netStatsApp.factory('socket', function ($rootScope) {
var socket = new Primus();
return socket;
});
netStatsApp.factory('toastr', function ($rootScope) {
toastr = window.toastr;
toastr.options = {
"closeButton": false,
"debug": false,
"progressBar": false,
"newestOnTop": true,
"positionClass": "toast-top-right",
"preventDuplicates": false,
"onclick": null,
"showDuration": "300",
"hideDuration": "1000",
"timeOut": "5000",
"extendedTimeOut": "1000",
"showEasing": "swing",
"hideEasing": "linear",
"showMethod": "fadeIn",
"hideMethod": "fadeOut"
};
return toastr;
});
netStatsApp.factory('_', function ($rootScope) {
var lodash = window._;
return lodash;
});