var app= angular.module( 'myApp', [] )
.config( function( $routeProvider ){
$routeProvider.when('/', {
title: "首页",
templateUrl: 'index',
});
$routeProvider.otherwise({ redirectTo: '/' });
})
.run( [ '$location', '$rootScope', function( $location, $rootScope ){
$rootScope.$on( '$routeChangeSuccess', function( event, current, previous ){
$rootScope.title= current.$$route.title ? current.$$route.title : '标题';
});
}]);
html
<title ng-bind="$root.title + ' - 后缀'">浩瀚孤鸿 - csdn</title>