Skip to content

$state.includes broken #2438

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
IcanDivideBy0 opened this issue Dec 31, 2015 · 4 comments
Closed

$state.includes broken #2438

IcanDivideBy0 opened this issue Dec 31, 2015 · 4 comments
Labels
Milestone

Comments

@IcanDivideBy0
Copy link

The $state.includes function seems broken :

console.log($state.current.name, $state.includes('**.todo.*'));
'awesome.edit.todo.inbox', false

v0.2.15
this used to return true in v0.2.11, propably introduced by 19715d1 or 232e94b

@eddiemonge
Copy link
Contributor

I know its an easy case, but can you create a plunkr showing this please?

@IcanDivideBy0
Copy link
Author

@christopherthielen
Copy link
Contributor

weird. **.todo.** works though. @nateabele can you have a look when you get a chance?

@christopherthielen christopherthielen added this to the 1.0.0-final milestone Feb 7, 2016
axar added a commit to axar/ui-router that referenced this issue Jul 19, 2016
fixed for angular-ui#2438, prevent matches for *.** based patterns.
@axar
Copy link

axar commented Jul 19, 2016

This is caused by 8c97736 raised at #1680
Inabout.person.item not sure whatabout.*.** is suppose to validate to? It's the same as saying about.** if we need to match that combo we can say about.*.*
I'm assuming that ** matches anything and nothing. while * matches exactly something.

If we wanted to do a particular number of nodes comparison by saying about.*.** matches exactly one element after about then any element after that. The current glob implementation isn't suitable.

#2880 pull request

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

Successfully merging a pull request may close this issue.

4 participants