Retrieve a route object by id or url, while taking metadata passed into account

Parameter NameTypeDescription
idStringCan be a route id or a generated route url
metadataObjectPass the parameters for the route and / or query string object.

params Object
query Object
strictBooleanIf false the builder will return a route registered with notFound as true.
var router = fluxapp.getRouter();

var route = router.getRoute('user-list', {
  method: 'POST'
});

route.id // user-list

var route = router.getRoute('/users/list', {
  method: 'POST'
});

route.id // user-list

var route = router.getRoute('/users/list-typo', {
  method: 'POST'
}, false);

route.notFound // true (if a not found route was registered)

👍

On to Dispatcher