こんにちは、私は親の状態で問題が子が呼び出されるときにアクティブになっています。角度のUIルータの親状態がアクティブでない
私はui-sref-active
機能を持つui-routerを使用しています。
は、ここに私のルータのコードです:
.state('customers', {
abstract: true,
parent: 'app',
url: '/customers',
templateUrl: 'app/customer/parent.html',
})
.state('customers.list', {
parent: 'customers',
url: '',
controller: 'customerCtrl as customer',
templateUrl: 'app/customer/index.html'
})
.state('customers.birthday', {
parent: 'customers',
url: '/birthday',
templateUrl: 'app/customer/birthday.html',
})
はここに私のhtmlです:メニューがたくさんありますので、私はNGリピートを使用してい
<ul id="menu-sidebar">
<li class="has_sub">
<a ui-sref="customers.list" class="waves-effect" ui-sref-active="subdrop">
<i class="fa fa-users"></i> <span> Customers</span>
</a>
</li>
</ul>
。
/customers
ui-sref-active
が正しく動作していると問題が発生します。しかし、/customers/birthday
が呼び出されると、ui-sref-activeはなくなります。ここではスクリーンショット下の
:
それを操作できるようにする方法を任意のアドバイスはありますか?
ありがとうございます!
で、それは働いていません。私はあなたのやり方を試しました。ありがとう – ssuhat