My app sets up several routes and then starts the router. I have a scenario now in which I'm loading additional code on demand, which requires its own routes. I need the new routes to be inserted at the beginning of the route collection because they handle more specific cases than what was added initially.
I got it working using the following code:
Is this the recommended approach?
Thanks,
Gary
I got it working using the following code:
_router.route(route, callback);
_router.routes.unshift(_router.routes.pop());
Thanks,
Gary