Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE Router Service] recognize and recognizeAndLoad #17034

Merged
merged 1 commit into from
Oct 3, 2018

Conversation

chadhietala
Copy link
Contributor

This introduces 2 new methods to the router service.

recognize: 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.

recognizeAndLoad: Takes a string URL and returns a promise that resolves to a RouteInfoWithAttributes for the leafmost route represented by the URL. The promise rejects if the URL is not recognized or an unhandled exception is encountered. This method expects to receive the actual URL as seen by the browser including the app's rootURL.

This rounds out all APIs on the router service.

@@ -266,6 +267,43 @@ if (EMBER_ROUTING_ROUTER_SERVICE) {
this.trigger('routeDidChange', transition);
});
},

// Uncomment this when we go the feature
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will use @category

@chadhietala chadhietala merged commit ebb15e4 into master Oct 3, 2018
@chadhietala chadhietala deleted the recognize-apis branch October 3, 2018 22:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants