.state('user-profile', {
url: '/user-profile/:userId', //Parent state
...
.state('user-profile.profile',{ //nested
url:'/profile',
...如何通过ui-sref“user/123/profile”访问url?
目前,我正在尝试这样做:
<a ui-sref="(user-profile({userId: currentUser._id})).profile">这让我想到了user-profile/123
发布于 2016-05-24 13:06:14
您就快到了,只需先使用状态名称,然后用params传递对象{}:
//<a ui-sref="(user-profile({userId: currentUser._id})).profile">
<a ui-sref="user-profile.profile({userId: currentUser._id})">https://stackoverflow.com/questions/37414459
复制相似问题