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?
这通过在<html>
标签上添加ng-app
解决。
上一篇: 可以吗? GMap API V2中的clearOverlays()到Google Maps API V3?
下一篇: 在<title>上绑定不起作用