【发布时间】:2017-04-17 17:29:27
【问题描述】:
$stateProvider.state('brands', {
url: '/brands',
controller: 'brandsController',
templateUrl: 'views/brands/brands.html'
});
和
$stateProvider.state('brands.details', {
url: '/details/:uid',
controller: 'brandController',
templateUrl: 'views/brand/brand.html',
params: { brand: null, product: null }
});
使用
<a ui-sref="brands.details({ uid: brand.uid, brand: brand, product: product })">{{ product.name }}</a>
始终重定向到父级。为什么?
【问题讨论】:
-
你能用 plunker/fiddle 重现这个吗?
-
父视图中可能没有
ui-view容器
标签: javascript html angularjs angular-ui-router