如何在ui路由器中分组路由?
例如,我的应用程序中有以下路线
#/products/p1 #/products/p2 #/products/p3
定义状态的一种方式是,
.state(âproducts.p1â) .state(âproducts.p2â) .state(âproducts.p3â)
但我正在寻找以下内容,有可能吗?
.state(âproductsâ,{ âp1â : {}, âp2â : {}, âp3â : {} })
这应该通过参数进行管理
#/products/p1 // parameter p with value p1 #/products/p2 // still parameter p with value p2 #/products/p3 // value is p3
状态可以这样定义
.state('products', { url: "/products/:p ... })