8000 feat(ngRoute):change pathRegExp to respect optional wildcard route params by murphomatic · Pull Request #14011 · angular/angular.js · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

feat(ngRoute):change pathRegExp to respect optional wildcard route params #14011

Closed

Conversation

murphomatic
Copy link
Contributor

change pathRegExp to accept the two-character option of '*?' on route params to allow them to be wildcard and optional at the same time. Motivation for change inspired by the need to accept an auth token on the URL that contained slashes (need for wildcard param) but this token on the URL was not required (need for optional param). Previous behavior only saw the param as wildcard and not optional, which resulted in the need for a trailing slash on the url (e.g. /login/ vs. /login)

new feature - does not address any open issues

…rams

change pathRegExp to accept the two-character option of '*?' on route params to allow them to be wildcard and optional at the same time.  Motivation for change inspired by the need to accept an auth token on the URL that contained slashes (need for wildcard param) but this token on the URL was not required (need for optional param).  Previous behavior only saw the param as wildcard and not optional, which resulted in the need for a trailing slash on the url (e.g. /login/ vs. /login)

new feature - does not address any open issues
@murphomatic murphomatic changed the title feat(ngRoute):change pathRegExp to respect optional wildcard route pa… feat(ngRoute):change pathRegExp to respect optional wildcard route params Feb 11, 2016
"grunt-bump": "~0.0.13",
"grunt-contrib-clean": "~0.6.0",
"grunt-contrib-compress": "~0.12.0",
"grunt-contrib-connect": "~0.8.0",
"grunt-contrib-copy": "~0.6.0",
"grunt-contrib-jshint": "~0.10.0",
"grunt-contrib-jshint": "https://registry.npmjs.org/grunt-contrib-jshint/-/grunt-contrib-jshint-0.10.0.tgz",
Copy link
Member

Choose a reason for hiding this comment

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

These changes should be removed.

@gkalpak
Copy link
Member
gkalpak commented Feb 11, 2016

LGTM with the comments addressed 👍

8000
Sean Murphy added 2 commits February 11, 2016 12:26
…rams

change pathRegExp to accept the two-character option of '*?' on route params to allow them to be wildcard and optional at the same time.  Motivation for change inspired by the need to accept an auth token on the URL that contained slashes (need for wildcard param) but this token on the URL was not required (need for optional param).  Previous behavior only saw the param as wildcard and not optional, which resulted in the need for a trailing slash on the url (e.g. /login/ vs. /login)

new feature - does not address any open issues
…rams

change pathRegExp to accept the two-character option of '*?' on route params to allow them to be wildcard and optional at the same time.  Motivation for change inspired by the need to accept an auth token on the URL that contained slashes (need for wildcard param) but this token on the URL was not required (need for optional param).  Previous behavior only saw the param as wildcard and not optional, which resulted in the need for a trailing slash on the url (e.g. /login/ vs. /login)

new feature - does not address any open issues
@murphomatic
Copy link
Contributor Author

apologies for the miss, everything should be set now.

@murphomatic
Copy link
Contributor Author

@gkalpak Let me know if there is any other work you see that needs to be done (I believe I've satisfied the issues you've commented on). Thank you!

@gkalpak
Copy link
Member
gkalpak commented Feb 16, 2016

Merged ! Thx @murphomatic 👍
I figured it is a fix, so...backported to v1.5.x (c0797c6) and v1.4.x (6a4403a).

@murphomatic
Copy link
Contributor Author

Awesome! Thanks @gkalpak!

@murphomatic murphomatic deleted the optional-wildcard-route-params branch February 16, 2016 18:42
@murphomatic murphomatic restored the optional-wildcard-route-params branch February 16, 2016 18:44
@murphomatic murphomatic deleted the optional-wildcard-route-params branch February 16, 2016 18:46
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0