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

fix($routeProvider): fix #1501 wrong mapping of $routeParams #1692

Closed

Conversation

gonzaloruizdevilla
Copy link
Contributor

Routes like '/bar/foovalue/barvalue' matching '/bar/:foo/:bar'
now are well mapped in $routeParams to:
{bar:'barvalue', foo:'foovalue'}

Closes: #1501
Signed-off-by: Gonzalo Ruiz de Villa [email protected]

@gonzaloruizdevilla
Copy link
Contributor Author

I've changed one line commited and rebased the two commits in 7feece8
Instead of using indexOf in line 325 of route.js, now it uses chartAt, which is more clear and performant.
I'm not sure how to add this commit to this PR.
Must I make another PR and close this one or I can modify this one?
Sorry about this, but these are the firsts PR I'm making.

@IgorMinar
Copy link
Contributor

@gonzaloruizdevilla just add the commit to this very same branch (issue1501) and push it to your repository

@IgorMinar
Copy link
Contributor

@gonzaloruizdevilla I looked at 7feece8 and ideally you should reset your issue1501 branch to 7feece8 and then force-push to your github repo. that will update this pull request.

@IgorMinar
Copy link
Contributor

I reviewed 7feece8 and except for small formatting issue and a better subject in the commit message it looks great.

Routes like '/bar/foovalue/barvalue' matching '/bar/:foo/:bar'
now are well mapped in $routeParams to:
{bar:'barvalue', foo:'foovalue'}

Closes: angular#1501
Signed-off-by: Gonzalo Ruiz de Villa <[email protected]>
@gonzaloruizdevilla
Copy link
Contributor Author

@IgorMinar Thank you for your instructions. I've changed the commit message and I've addressed the formatting issue.

@IgorMinar
Copy link
Contributor

landed as 30a9da5

thanks!

If you haven't received our t-shirt yet please fill out http://goo.gl/075Sj

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

$routeParams get confused with some urls
2 participants