0
使用ui路由器如何完成以下URL更改?例如,當用戶轉到「/ page?hello = True」時,我希望url更改爲「/ page?status = hello」。使用UI路由器更改URL中的查詢參數
$stateProvider.state('page', {
url: '/page/:id?status',
controller: 'MyCtrl as myCtrl',
templateProvider: function($templateCache) {
return $templateCache.get('templates/route.html');
}
});
可以使用'stateChangeStart'事件UI路由器更改URL的PARAMS。 – reptilicus