已经从NgBoilerPlate下载了https://github.com/ngbp/ngbp。使用它作为模板来构建一个网站。流动情况如下-
index.html
<li ui-sref-active="active">
<a href ui-sref="home">
<i class="fa fa-home"></i>
Home
</a>
</li>app.js
angular.module( 'ngBoilerplate', [
'templates-app',
'templates-common',
'ngBoilerplate.home',
'ngBoilerplate.about',
'ui.router'
])Home.js
angular.module( 'ngBoilerplate.home', [
'ui.router',
'plusOne'
])
/**
* Each section or module of the site can also have its own routes. AngularJS
* will handle ensuring they are all available at run-time, but splitting it
* this way makes each module more "self-contained".
*/
.config(function config( $stateProvider ) {
$stateProvider.state( 'home', {
url: '/home',
views: {
"main": {
controller: 'HomeCtrl',
templateUrl: 'home/home.tpl.html'
}
},
data:{ pageTitle: 'Home' }
});
})现在,当单击Home|ngBoilerplate时,标题显示为homeTab
如何摆脱|ngBoilerPlate的标题。
谢谢
发布于 2016-03-21 07:26:55
$scope.pageTitle = toState.data.pageTitle + ' | ngBoilerplate' ;https://stackoverflow.com/questions/36125092
复制相似问题