Angular-ui-router: how to clear and reconfigure states?

I am dynamically loading my states (based on the server call) into

. window.$stateProviderRef

is just a reference to $stateProvider

, set on the window object inapp.config(..)$http) {
        success(function(data, status, headers, config) {

            angular.forEach(data, function(state) {
                window.$stateProviderRef.state(, { url: state.url, templateUrl: state.templateUrl) : state.templateUrl });




Is there any way to clear or reload the state configuration? So the previous states are invalidated and new states are loaded?


source to share

1 answer

This is not possible at the moment, but on the Angular roadmap you can keep up with progress here



All Articles