I switched to ui-router . Everything went smoothly, except for one. On my page, I have a choice that changes the context of the application. In any case, earlier, when this context was changed, I executed this code (in particular, the set method):
'use strict'; angular.module('main').factory('lacContext', ['$route', function ($route) { return { set: function (id) { sessionStorage.setItem("lac-context", id); $route.reload(); }, get: function () { return sessionStorage.getItem("lac-context"); } }; }])
and
$route.reload()
did the most important thing. He reloaded the page. But after switching to ui-router, $ route.reload does nothing. Also, I did not find an analog in the ui-router API. How to solve this problem?
angularjs angular-ui-router
dragonfly
source share