I have these states defined (after defining an abstract state site
):
.state('catalog', {
parent: 'site',
url: '/catalog?salesorg',
template: '<catalog></catalog>'
})
.state('product', {
parent: 'catalog',
url: '/product/:id',
template: '<product-details></product-details>'
})
I try to go to the product
state with this:
$state.go('product', { id: materialNumber });
Which is fired by:
<a ng-click="vm.goToProductDetails(product.materialNumber)">Product</a>
The page does not change though the URL does:
/#/catalog/product/000000000000123805
I am trying to make the product
state a child of catalog
state so that it can inherit the scope of catalog
, but I don't want to have the URL include /catalog
before /product
as that would break the current URL scheme.
答案 0 :(得分:0)