Ordering of routes

2 posts, 0 answers
  1. Gary
    Gary avatar
    62 posts
    Member since:
    Sep 2013

    Posted 09 May 2013 Link to this post

    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:
    _router.route(route, callback);
    Is this the recommended approach?

  2. Petyo
    Petyo avatar
    2444 posts

    Posted 13 May 2013 Link to this post

    Hi Gary,

    This approach should work, although it relies on the undocumented routes field, which may (though unlikely) be refactored and changed in future releases. 

    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top