I know that there are many ways to create both static and dynamic page names with angular, but the best way I've found so far is angular-ui-router-title .
In short, it works as follows:
$stateProvider.state('a', {
...
resolve: {
$title: function () { return 'a title'; }
}
...
}
and in view:
<title ng-bind="$title"></title>
Now I want the dynamics to work dynamically, with angular-translate . When the user changes the language in my application, the event fires in the root area, and I use $translate.use()to change the language used.
I decided that I could just do this:
<title ng-bind-template="{{$title | translate}}"></title>
, , . ?