タイトル内の角度経路のオプションパラメータはどのように使用できますか。角 - タイトル内の任意のパラメータの使用
だから私はtextToSearch
がタイトルに表示する:
.when('/search/:textToSearch',
{
title: 'Searching' + textToSearch,
templateUrl: 'views/search.html',
controller: 'searchController'
}
)
と私はrouteChangeSuccessにタイトルを設定しています:
$rootScope.$on('$routeChangeSuccess', function() {
//Set the <title> tag
if (!$route.current.title) {
document.title = 'Default Generic Title';
} else {
document.title = $route.current.title;
}
}
どのように 'title'を使いますか?このようにhttp://stackoverflow.com/questions/26308020/how-to-change-page-title-in-angular-using-routeprovider/26308083#26308083? – dfsq
ありrouteChangeSuccessを使用しています - 更新コード – userMod2