angular.js - angularjs state.go parameters cannot be obtained after refreshing the page. What should I do?
某草草
某草草 2017-05-15 17:12:14
0
2
977

angularjs state.go parameters cannot be obtained after refreshing the page. What should I do

某草草
某草草

reply all(2)
滿天的星座
        .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 })"

我想大声告诉你

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"}是传给路由的参数
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template