bansho/app/app.js
Vincent Fournier 844d9e0e6e Clean config.js and remove container
Change-Id: Ieeb6980232c02ec72a6a0caa707dddbacb008a6f
2015-08-26 16:45:55 -04:00

39 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', 'sharedData', 'reinitDrupalTiles', 'reinitDrupalInfo', 'componentsConfig',
function ($rootScope, templateManager, sharedData, reinitDrupalTiles, reinitDrupalInfo, componentsConfig) {
componentsConfig.load();
$rootScope.$on('$locationChangeStart', function () {
sharedData.clear(false);
templateManager.clearIntervals(false);
reinitDrupalTiles();
reinitDrupalInfo();
});
}]);