Skip to content

Instantly share code, notes, and snippets.

@lordnox
Created March 22, 2016 11:56
Show Gist options
  • Save lordnox/887494dcb1e9da4623ab to your computer and use it in GitHub Desktop.
Save lordnox/887494dcb1e9da4623ab to your computer and use it in GitHub Desktop.
module.run(function($rootScope) {
$rootScope.$on($stateChangeSuccess, function($event, toState, toParams, fromState, fromParams) {
if(toState.title)
$rootScope.title = toState.title
})
})
module.config(function($stateProvider) {
$stateProvider.state('myState', {
data : {
title: 'My TITLE!'
},
template : '<h1>Page</h1>'
})
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment