I have an abstract state "settings" with a set of children defined using strings, like "settings.personal", "settings.business" and so on. I need to check in a higher level shared controller if current state is a child of abstract "settings" state.
I can't figure out how to check for this? I tried to use $state.is
hoping it's smart enough to detect this but it seems it's not.
$state.is("settings") # => false
$state.is("settings.personal") # => true
So, any other idea?
Ok I now see that there's also $state.includes
method which does exactly what I wanted.
I'll leave this question for community to judge if it's worth keeping or should it be deleted.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With