2017-10-06 31 views

回答

1
$stateProvider 
     .state('catalog', { 
      url: '/catalog' 
     }) 
     .state('catalog.categoryName', { 
      url: '/catalog/:category_name/:category_id/:product_name/:product_id' 
     }); 

和HTML

<a href="" ui-sref="app.catalog.name(category_name:yourcategori, category_id: yourcategoryid, product_name:yourproductname, product_id: yourproductid)"; 

或控制器訪問

$state.go('app.catalog.name',{category_name:yourcategori, category_id: yourcategoryid, product_name:yourproductname, product_id: yourproductid}); 

所有這些都在ui-router

相關問題