angular-ui / ui-router

The de-facto solution to flexible routing with nested views in AngularJS
http://ui-router.github.io/
MIT License
13.54k stars 3k forks source link

How to update url to new, but save old. #3477

Closed inceon closed 4 years ago

inceon commented 7 years ago

I have a problem, i need to update url to new, but if user get old address need redirect to new. The main problem that at me the abstract state. Example route:

{
    name: 'process',
    config: {
        url: '',
        abstract: true,
        template: '<ui-view></ui-view>'
    }
},
{
    name: 'process.one',
    config: {
        url: '/process/:process_name',
        abstract: true,
        templateUrl: '<ui-view></ui-view>',
        controller: 'OneProcess',
        controllerAs: 'vm'
    }
},
{
    name: 'process.one.space',
    config: {
        url: '/version/:mode',
        templateUrl: 'app/templates/process-space.html',
        controller: 'ProcessSpace',
        controllerAs: 'vm'
    }
},
{
    name: 'process.one.analytics',
    config: {
        url: '/analytics',
        templateUrl: 'app/templates/analytics.html',
        controller: 'AnalyticsCtrl',
        controllerAs: 'vm'
    }
},

Needed replace url: '/process/:process_name' to url: '/processes/:process_name' What best way to make it? Question on stackoverflow: https://stackoverflow.com/questions/44635001/how-to-update-url-to-new-but-save-old-in-angularjs

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

This does not mean that the issue is invalid. Valid issues may be reopened.

Thank you for your contributions.