A function is used in routing to configure the templateUrl, but after the user performs a certain operation, the template needs to point to a different value. At this time, the new value will only be obtained when the page is refreshed. template, how can I let this route reconfigure in the controller and execute the reurl function when ui-sref=""? Without refreshing the entire page;
I tried ui-sref-opts="{reload:'user.result'}" but it doesn’t work. Templateurl cannot be redefined
迷茫2017-05-15 17:11:15
It seems that routing cannot be reconfigured. You can pass the parameters in your reurl to the controller, and different pages can be displayed and hidden in the controller.
滿天的星座2017-05-15 17:11:15
Thanks for the invitation.
It can be changed again.
You try to inject it$state
into the controller, and then you can see that there is a routing table in it, and you can just change the data in it.
Although violence is not elegant, it can solve your problem