This repository has been archived by the owner on Apr 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 27.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat($route): express style route matching
Added new route matching capabilities: - optional param Changed route matching syntax: - named wildcard BREAKING CHANGE: the syntax for named wildcard parameters in routes has changed from *wildcard to :wildcard* To migrate the code, follow the example below. Here, *highlight becomes :highlight*: Before: $routeProvider.when('/Book1/:book/Chapter/:chapter/*highlight/edit', {controller: noop, templateUrl: 'Chapter.html'}); After: $routeProvider.when('/Book1/:book/Chapter/:chapter/:highlight*/edit', {controller: noop, templateUrl: 'Chapter.html'});
- Loading branch information
Showing
3 changed files
with
151 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I've opened a PR for this line here #3602
The problem Im having is that a route like
/foo/:id
will currently match/foo/
returning{ id: '' }
. With the current changes I believe this should not be the case as one would expect/foo/:id?
to match and/foo/:id
to fail.I've added a test case to the PR to underline the problem.