rule
Get the routing rule that matches a url.
route.rule(url)
route.register( "recipes/{recipeId}" );
route.register( "tasks/{taskId}" );
route.rule( "recipes/5" ); //-> "recipes/{recipeId}"
Parameters
- url
{String}
:A url or url fragment.
Returns
{String|undefined}
:
Returns the registered routing rule
that best matches the provided url. If no rule matches, undefined
is returned.