0
.state('app.post', {
url: "/post/:postId",
views: {
'menuContent' :{
templateUrl: 'templates/postPages/viewPost.html',
controller: 'ViewPostController'
}
}
})
.state('app.post.edit', {
url: "/edit/:postId",
views: {
'[email protected]' :{
templateUrl: 'templates/postPages/editPost.html',
controller: 'EditPostController'
}
}
})
.state('app.post.comments', {
url: "/comments/:postId",
views: {
'[email protected]' :{
templateUrl: 'templates/postPages/post-comments.html',
controller: 'PostCommentsController'
}
}
})
我有這個UI-SREF不正常呈現
<a class="tab-item" ui-sref="app.post.comments({postId:'{{post.id}}'})">
<i class="icon ion-chatbox"></i>
Comment
</a>
它呈現這樣的:
<a class="tab-item" ui-sref="app.post.comments({postId:'306cc780-71db-11e5-b49b-7bdc2a9aa3c7'})" href="#/app/post//comments/">
<i class="icon ion-chatbox"></i>
Comment
</a>
職位中缺少HREF
@Manish單擊向上箭頭,如果它確實幫助。 。 –