Is there a way to have multiple otherwise statements. I basically have an otherwise method that redirects any unknown urls to the home page.
$urlRouterPro`vider.otherwise('/home');
However now I am trying to create a multi step form that will use nested states:
.state('accountsetup', {
url: '/account-setup',
templateUrl: 'app/views/multiforms/account-setup/setup.html',
controller: 'AccountSetupCtrl'
})
.state('accountsetup.profile', {
url: '/profile',
templateUrl: 'app/views/multiforms/account-setup/profile.html'
})
.state('accountsetup.oncology', {
url: '/oncology',
templateUrl: 'app/views/multiforms/account-setup/oncology.html'
})
Of course I need the form to redirect to the /profile as it is the first view of the multi form. My thought was to add:
$urlRouterProvider.otherwise('/account-setup/profile');
Obviously this will only override the other. How do I go about achieving this behavior?
Thank you.