nonplus / angular-ui-router-title

AngularJS module for updating browser title/history based on the current ui-router state.
122 stars 30 forks source link

This should always update title when state changes #4

Closed kscc25 closed 9 years ago

kscc25 commented 9 years ago

This will cause the old $title will be used in the new state that doesn't have $title instead of default title set in the template:

            if(title) {
                $timeout(function() {
                    $rootScope.$title = title;
                });
            }

Should be change to this:

            title = title || '';
            $timeout(function() {
                $rootScope.$title = title;
            });

I have a workaround commit here but not intend to send PR because I'm lazy to install gulp and writing tests :D.