0
已經從https://github.com/ngbp/ngbp下載了NgBoilerPlate。 將其用作構建網站的模板。 流是如下 -AngularJS-修改NgBoilerPlate模板來修改網頁的標題
的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' }
});
})
現在,當homeTab是clicked- 標題顯示爲首頁| ngBoilerplate
如何擺脫|從標題ngBoilerPlate。
感謝
感謝........ .. – Rehan
@Rehan在堆棧溢出中,我們做的是投票而不是表示感謝: ) – Abhi