Is there a public `recognize` method anywhere on the router?

I stumbled across this part of RFC 95:

New Method: URL recognition


Takes a string URL and returns a RouteInfo for the leafmost route represented by the URL. Returns null if the URL is not recognized. This method expects to receive the actual URL as seen by the browser including the app’s rootURL .

I was wondering if this ever became public API anywhere? Snooping around and it doesn’t seem like it but it was documented in the RFC which was merged, so trying to clarify my understanding here. (Usually the RFC doc is updated with the actual work done correct? Or is it more of a sign-off on the design?)


I’m pretty sure @chadhietala is actively working on completing those RFC 95 features.

Doing them correctly required significant refactoring of the router.js microlib, because RouteInfo is really a rationalization of data structures that come from there.

Short answer: Yes. It is on the Router Service in the current beta.

All of the Router Service and the new Router Events APIs as described in RFC 95 are in the current beta. At this point we have a enough head room to do much larger internal refactors and rationalization of the system to make things like {{route-info}} and {{with-route-info}} work. We should be able to greatly simplify the code in the routing layer and potentially carve out the path to address QPs. These changes will also make implementing the Router Helpers RFC much easier.



Nice work Chad, and thanks for the update! :smiley: