Closed dmarcelino closed 9 years ago
That's a good point. I'll probably change the behavior s.t. if you go to a state that doesn't resolve a $title
(nor do any of its parent states), the $rootScope.$title
will be set to undefined
.
That way, in you template you would be able to do something like this:
<title ng-bind="$title || 'Default Title'">Default Title</title>
I like that! :+1:
Thanks!
Sorry, am I missing something, or you've undone your change in the next commit "[Prerelease] Bumped version number" [https://github.com/nonplus/angular-ui-router-title/commit/d4fda7fa06b7c1bac56f96881aeafd5f19e614c6]?
I was wondering, if one has lots of routes on their app and doesn't want to set
$title
on every state, is there a way to set a default$title
?The current issue I'm facing is that if a user goes from a state with
$title
defined to a state without$title
,$title
will have the value of the last state. Not a big issue, but could make life easier.