-
First, add a property to the
'manager.staffDetail.view'
state ofabstract:true
. This isn’t required, but you want to set this since you’d never go to this state directly, you’d always go to one of it’s child states. -
Then do one of the following:
-
Give the
'manager.staffDetail.view.schedule'
state an empty URL. This will make it match the same URL as it’s parent state URL, because it appends nothing to the parent URL.`.state('manager.staffDetail.view.schedule', {url:'', ...`
-
Or if you want to keep the URL of the default child route unchanged, then set up a redirect in your
module.config
. This code here will redirect any location of'/staff/{id}/view'
to the location of'/staff/{id}/view/schedule'
:`$urlRouterProvider.when('/staff/{id}/view', '/staff/{id}/view/schedule');`