6
ブレッドクラムを作成するためにUI-Routerを使用するAngular Breadcrumbディレクティブ(ここでは、https://github.com/ncuillery/angular-breadcrumb)を使用しています。角度ブレッドクラム:ブレッドクラムを動的に変更するドロップダウンを含む
これは、箱から出して素晴らしい作品とシンプルな階層リンクナビゲーションのための罰金です。しかし、私がしたいのは、アプリケーションのクラムをクリックしてドロップダウンを表示し、他のアプリケーションを選択できるようにすることです。別のアプリケーションを選択すると、URLが動的に変更されます。
これまでのところ、私はdisplayName
を編集して、別のアプリケーションを選択したときのブレッドクラム構造を変更する方法がわからない場合があります。
index.htmlを
<div class="app-breadcrumbs-container">
<ui-breadcrumbs
displayname-property="data.displayName"
template-url="/shared/templates/breadcrumbs.html">
</ui-breadcrumbs>
</div>
breadcrumbs.html
例えば<div class="app-breadcrumb" flex>
<ol>
<li ng-repeat="crumb in breadcrumbs"
ng-class="{ active: $last }">
<a ui-sref="{{ crumb.route }}" ng-if="!$last">{{ crumb.displayName }} </a><span ng-show="$last">{{ crumb.displayName }}</span>
<i ng-hide="$last" class="material-icons">keyboard_arrow_right</i>
</li>
</ol>
</div>
stateprovider
.state('apps', {
url: '',
views: {
'[email protected]': {
templateUrl: 'index.html'
}
},
data: {
displayName: 'Application'
}
}
...優先度の高い独自のディレクティブを書くことができ ...クラム・リンクに新しいディレクティブを添付しなければなりませんページ?プルダウンでアプリケーションをクリックすると、たとえば次のような処理が行われます。 Campagins、さらには活動状態? – LordTribual
はい、選択したアプリケーションに基づいてキャンペーンが更新されるように、それは維持されます。 – iamryandrake
@ryanこれを解決しましたか?私はあなたと同じことをしている – DannyG