angular.js - ui-router 有没有手动重新加载路由配置的方法?
世界只因有你
世界只因有你 2017-05-15 17:09:15
0
2
519


路由中使用函数来配置templateUrl,但是用户经过某个操作后,template需要指向不同的值,这时候只有在刷新页面的时候才会获得新的template,请问如何在 ui-sref=“”的时候,和在控制器中让这个路由重新配置一边,执行reurl函数呢?在不刷新整个页面的前提下;

试了一下 ui-sref-opts="{reload:'user.result'}" 无效 不能重新定义templateurl

世界只因有你
世界只因有你

reply all(2)
迷茫

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

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template