This example will allow for decorating all or some routes of a router with a different routing strategy.
Here we check if the settings
option indexed: true
.
If it is set, we then reconfigure the routing path to joinPath(moduleId, 'index')
This allows for easy nested routing per folder, for the following type of application layout.
pages
index
contacts
index
Pretty awesome!
However would be nice if we could centralise this kind of logic on the router itself instead of having to go through all this on the individual route level :P