ng-bind on <title> 不起作用



使用1.3.0-rc1(最新版本)。

我试过了:

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

但什么都没有。

如果我在<body>中的任何位置执行{{title}},它都有效。

我在做:

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

我可以在模型中看到我的title<title>标签怎么了?

这是通过在<html>标记上添加ng-app来修复的。

最新更新