Skip to content

uiSref does not update 'href' if an required param is ever undefined #2091

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

Closed
christopherthielen opened this issue Jul 11, 2015 · 0 comments
Closed
Assignees
Labels
Milestone

Comments

@christopherthielen
Copy link
Contributor

If ui-sref ever fails to generate an href, it gives up on ever trying again. This is a problem for a ui-sref which targets a state that has any required params, if the bound values are ever null.

Due to this code: https://github.com/angular-ui/ui-router/blob/master/src/stateDirectives.js#L107-L118

I think we should probably just get rid of the "!nav" check alltogether.

To see this fail, change this line https://github.com/angular-ui/ui-router/blob/master/test/stateDirectivesSpec.js#L15 from an optional string parameter to a required int parameter.

that is, change url: "/:id" to url: "/{id:int}"

@christopherthielen christopherthielen self-assigned this Jul 11, 2015
@christopherthielen christopherthielen added this to the 1.0.0-preview milestone Jul 11, 2015
ExpFront pushed a commit to ExpFront/ui-router that referenced this issue Jun 23, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant