You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In some scenarios I wanna now if crossroads.parse() has matched any routes. For example, if the path did not match any existing route, I might want to forward them to a default one. One way to provide this information would be to simply have parse() return true or false based on whether any route was matched. And/or you could provide an additional method that checks if a path matches any existing route without actually triggering the route callback if it does.
The text was updated successfully, but these errors were encountered:
@millermedeiros why don't you make the _getMatchedRoutes method available in the API documentation of crossroads?
I know that you use this function internally but there is no warranty that this would be maintain in the future or if it will be replaced by something else.
I believe it will be important to have documentation that this is possible. I am actually using this method but to figure it out I add to go through all crossroads.js to know its existence.
In some scenarios I wanna now if
crossroads.parse()
has matched any routes. For example, if the path did not match any existing route, I might want to forward them to a default one. One way to provide this information would be to simply haveparse()
returntrue
orfalse
based on whether any route was matched. And/or you could provide an additional method that checks if a path matches any existing route without actually triggering the route callback if it does.The text was updated successfully, but these errors were encountered: