Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我让用户选择一个控制器依赖项所依赖的选项,当用户更改该选项时,我想重新加载路由但也运行$routeProvider.
$routeProvider
$route.reload()只需重新加载具有相同依赖项的控制器。
$route.reload()
有没有办法在不刷新整个窗口的情况下做到这一点?
将您的位置更新为相同的路线,但使用不同的参数值$location.path()或$location.search()
$location.path()
$location.search()