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

URL matcher with squash param is ignoring slashes #2064

Closed
eddiemonge opened this issue Jun 25, 2015 · 0 comments
Closed

URL matcher with squash param is ignoring slashes #2064

eddiemonge opened this issue Jun 25, 2015 · 0 comments
Assignees
Milestone

Comments

@eddiemonge
Copy link
Contributor

If I define a parameter in the url and state that squash is true for it, it will ignore slashes and think that things after the id.

I want /test to be the url for the state. However, if squash is true, then it will also match /test123 and use 123 as the id. It should not match the state.

http://plnkr.co/edit/oIdIw3ntlqUpzHxhTWQe?p=preview
Example of the bug: http://run.plnkr.co/y1ii0hP2lnbQ3DLC/#/test123

$stateProvider.state('layout', {
    url: '/test/:id',
    params: {
      id: {
        value: null,
        squash: true
      }
    },
...
@christopherthielen christopherthielen added this to the 0.2.16 milestone Aug 19, 2015
ExpFront pushed a commit to ExpFront/ui-router that referenced this issue Jun 23, 2016
Squashed params were ignoring a missing slash before the param so things
like /users123 would match /url/:id

Fixes angular-ui#2064
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

No branches or pull requests

3 participants