0
我想弄清楚如何動態更新angularjs單頁面應用程序中的元標記。我已經想通了如何使用做了標題標籤:動態更新AngularJS單頁面應用程序中的元標記
myApp.run(function($location, $rootScope) {
$rootScope.$on('$routeChangeSuccess', function (event, current, previous) {
$rootScope.title = current.$$route.title;
});
});
和
<title ng-bind="title">myApp</title>
和
$routeProvider.when('/', {
templateUrl : '/pages/home.html',
controller : 'homeController',
title: 'the home page'
})
但是很爲難如何將其擴展到meta標籤。