Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ng-bind on <title> doesn't work

Using 1.3.0-rc1 (latest now).

I tried:

<title ng-bind="title"></title>

<title>{{title}}</title>

But nothing.

If I do {{title}} anywhere in <body> it works.

I'm doing:

app.main.run(function($rootScope) {
    $rootScope.$on('$routeChangeSuccess', function(event, current, previous) {
        if (current.hasOwnProperty('$$route')) {
            $rootScope.title = current.$$route.title;
        }
    });
});

I can see my title in the model. What's going on with the <title> tag?

like image 295
Syl Avatar asked Sep 11 '14 10:09

Syl


1 Answers

This is fixed by adding ng-app on <html> tag.

like image 86
Syl Avatar answered Oct 05 '22 00:10

Syl