Fix for Issue #3517 Display Current Page Name

Revision for Fix for issue #3517

lint: Remove extraneous white space in app.js file

fix: Correct attribute from pageTitle to title in $state interface
This commit is contained in:
Paul Rich
2015-12-17 16:12:25 -05:00
committed by Blade Barringer
parent 7ef4fab289
commit 56a00efb19
4 changed files with 85 additions and 29 deletions

View File

@@ -15,6 +15,9 @@ habitrpg.controller("RootCtrl", ['$scope', '$rootScope', '$location', 'User', '$
$rootScope.$on('$stateChangeSuccess',
function(event, toState, toParams, fromState, fromParams){
$rootScope.pageTitle = $state.current.title;
if (!!fromState.name) Analytics.track({'hitType':'pageview','eventCategory':'navigation','eventAction':'navigate','page':'/#/'+toState.name});
// clear inbox when entering or exiting inbox tab
if (fromState.name=='options.social.inbox' || toState.name=='options.social.inbox') {