Skip to content

$state.includes() only works with exact match or wildcards #1229

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
chrisspiegl opened this issue Jul 28, 2014 · 2 comments
Closed

$state.includes() only works with exact match or wildcards #1229

chrisspiegl opened this issue Jul 28, 2014 · 2 comments

Comments

@chrisspiegl
Copy link

I just tried to use the $state.includes().
Here are some things I tried that worked or not:

States:

  • app
  • app.client
  • app.client.detail

Tests:

  • $state.transitionTo('app.client')
  • $state.includes('app')) - should be true - is true
  • $state.includes('app.client')) - should be true: - is true
  • $state.includes('client')) - should be true - is undefined
  • $state.includes('*.client')) - should be true - is undefined
  • $state.includes('detail')) - should be false - is undefined

http://plnkr.co/edit/0jL9j2JOm6AZ3Ucm0iAN

As far as I understand, $state.includes('client') should match app.client?

Is it me or is there something wrong?

@christopherthielen
Copy link
Contributor

includes and is does not support wildcards, AFAIK. See issue #244

includes does not yet support relative states, but there is an open pull request that needs some work #636

use the fully qualified state name

@chrisspiegl
Copy link
Author

ok thanks.

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

2 participants