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
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.
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