I am using angular-ui-router
and nested states in my application, and I also have a navigation bar. The nav bar is hand written, and uses ui-sref-active
to highlight the current state. It is a two-level navigation bar.
Now, when I am in, say Products / Categories
I would like both Products
(in level 1) and Categories
(in level 2) to be highlighted. However, using ui-sref-active
, if I am in state Products.Categories
then only that state is highlighted, not Products
.
Is there some way to make Products
highlight in that state?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…