angularjs state.go parameters cannot be obtained after refreshing the page. What should I do
.state("order.detail", { url: "/Detail/?:order_id", templateUrl: "/detail.html", title: "Detail", controller: "detailCtrl", params: {'order_id': null, 'order_status': null} });
The routing configuration writes the parameters into the url,:order_id在跳转的过程中传递参数ui-sref="order.detail({ order_id: order.id })"
:order_id
ui-sref="order.detail({ order_id: order.id })"
Thanks for the invitation
As mentioned on the first floor, routing parameters can be configured
ui-sref is used for html jump
The controller can use $state.go, such as
$state.go('list', { item: "Ringo" }); // list是路由名,{item: "Ringo"}是传给路由的参数
The routing configuration writes the parameters into the url,
:order_id
在跳转的过程中传递参数
ui-sref="order.detail({ order_id: order.id })"
Thanks for the invitation
As mentioned on the first floor, routing parameters can be configured
ui-sref is used for html jump
The controller can use $state.go, such as