bansho/app/app.js
Vincent Fournier 5d87fdaacd Improve code naming
Change-Id: If4837f71caca6d594e141fff830c7c2c08376e03
2015-08-24 20:33:27 -04:00

38 lines
1.1 KiB
JavaScript

'use strict';
angular.module('bansho', [
'ngRoute',
'ngCookies',
'angular.filter',
'bansho.config',
'bansho.authentication',
'bansho.topbar',
'bansho.sidebar',
'bansho.surveil',
'bansho.datasource',
'bansho.customDirective',
'bansho.drupal',
'bansho.drupal.tile',
'bansho.drupal.info',
'bansho.view',
'bansho.view.page',
'bansho.view.drupalDashboard',
'bansho.view.drupal',
'bansho.grafana'
])
.config(['$routeProvider', function ($routeProvider) {
$routeProvider.otherwise({redirectTo: '/view'});
}])
// Reinitialise objects on url change
.run(['$rootScope', 'templateManager', 'reinitDrupalTiles', 'reinitDrupalInfo', 'componentsConfig',
function ($rootScope, templateManager, reinitDrupalTiles, reinitDrupalInfo, componentsConfig) {
componentsConfig.load();
$rootScope.$on('$locationChangeStart', function () {
templateManager.clearIntervals();
reinitDrupalTiles();
reinitDrupalInfo();
});
}]);