Assuming I have the following Durandal route map defined...
vm.router.reset()
.makeRelative({
moduleId: 'salesorder/createorder',
fromParent: true,
route: ':cartId'
})
.map([
{ route: 'orderheader', moduleId: 'orderheader', title: 'Order Information', nav: 1, hash: '#createorder/' + cartId + '/orderheader' },
{ route: 'orderdetail', moduleId: 'orderdetail', title: 'Order Lines', nav: 2, hash: '#createorder/' + cartId + '/orderdetail' },
{ route: 'payment', moduleId: 'payment', title: 'Payment', nav: 3, hash: '#createorder/' + cartId + '/payment' }
])
.buildNavigationModel();
... can I modify the route map specifically changing the module associated with 'payment' to a different module - say 'payment-customer-specific'? I would like to perform this modification in the middle route - in the 'orderdetail' module prior to navigating to the route 'payment' such that a specific version of the payment module is used.
I understand parameterized routes exist but they will not help because of the current codebase I am using. I understand I could create the map ahead of time for the correct module, but again, current codebase constrains this. Looking for ability to modify mapped route-to-module relationship after the fact.