-
Notifications
You must be signed in to change notification settings - Fork 27.5k
Improved Angular routing in a backwards compatible way. #1634
Conversation
Addresses: - A TODO where most routes was being compiled and processed every single route change. Routes are now processed up front and simply matched - Routes are now processed in the order in which they are added instead of arbitrarily. - Helps with #1147 - Helps with #1159 - Makes #918 easier - It is now possible to match the forwardslash character. - It is now possible to restrict your match to string, int or path.
+1 |
@xealot thnx for your contribution! This PR will require some more work before it can be merged. In particular, could you go over the http://docs.angularjs.org/misc/contribute and make sure that:
|
Cool! I only miss documenting the new route syntax in the source code... |
@pkozlowski-opensource: No, we are not. This PR covers the functionality of #1147 which ultimately got reworked by me into #1560. I said that the PR is cool because it enhances the route specification by allowing restricting params to int, string and path values. But, as you said before, the PR must be reworked in order to being taken into consideration. This means rebasing, including documentation and rewriting the commit message. Sorry about confusing you! |
@pkozlowski-opensource CLA is signed, I must have fat fingered #1159, because that doesn't seem relevant at all. I believe there is another routing/matching open somewhere that this addresses fully or in part. I will attempt to correct the lack of documentation and squish the commits. @lrlopez thanks, the tests are a decent source to see how it works. I will try to put the documentation in the source. Also if you look at the way werkzeug does routing this mirrors that strategy. |
Is this going to be in the new release of angular? Thank you |
PR is stale. Can not be merged to master (needs to be rebase) Master already has similar feature (*path) wich makes this PR less useful. For this reason, I am closing it, feel free to reopen once fixed up. |
This, however, is much more flexible than the catch-all |
General routing improvements to support slash matching, ordered routing of ambiguous urls, typed groups and likely performance improvements.
Angular now basically supports the werkzeug routing syntax.
/foo/:bar
/foo/<path:bar>
/foo/<string:bar>/
/foot/<path:bar>/:id/
Addresses: