stackviz/app/js/on_run.js
Tim Buckley 7eab971d3f Switch to eslint.
This ports over changes made in openstack-health to convert the
project from jshint to eslint, with the eslint-config-openstack
plugin.

Change-Id: Iaa0490d07603e2481e1c738136f9fda1be95dea8
2015-11-18 15:36:36 -07:00

25 lines
473 B
JavaScript

'use strict';
/**
* @ngInject
*/
function OnRun($rootScope, AppSettings) {
// change page title based on state
var disable = $rootScope.$on('$stateChangeSuccess', function(event, toState) {
$rootScope.pageTitle = '';
if (toState.title) {
$rootScope.pageTitle += toState.title;
$rootScope.pageTitle += ' \u2014 ';
}
$rootScope.pageTitle += AppSettings.appTitle;
});
$rootScope.$on('$destroy', disable);
}
module.exports = OnRun;