7
使用1.3.0-rc1(最新版本)。ng-bind <title>不起作用
我想:
<title ng-bind="title"></title>
<title>{{title}}</title>
但一無所獲。
如果我做{{title}}
<body>
任何地方它的作品。
我做:
app.main.run(function($rootScope) {
$rootScope.$on('$routeChangeSuccess', function(event, current, previous) {
if (current.hasOwnProperty('$$route')) {
$rootScope.title = current.$$route.title;
}
});
});
我可以看到我的title
模型。 <title>
標記發生了什麼?
你在哪裏定義了你的應用和控制器?確保它在''標籤 – Dieterg 2014-09-11 10:35:51
@DieterGoetelen是的,你是對的,我忘記了,我的'ng-app'是在'
'而不是''!感謝的 – Syl 2014-09-11 10:41:53,因爲這是回答你應該回答問題或關閉它。 – Enkode 2015-10-22 19:18:35