
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
25 lines
473 B
JavaScript
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;
|