I'm creating a breadcrumb navigation in AngularJS. Some links should be disabled because the user didn't meet the requirements.
I've looked into the angular documentation and I figured out that you can't use ng-disabled
on a list-item. So i'm using a ng-class
to grey out the list-items.
Here is the HTML-code that I am using at the moment:
<li id="first">
<div ng-click="vm.navigateTo(0)">
<label translate="{{vm.translationKeys[0]}}"></label>
</div>
</li>
<li>
<div ng-click="vm.navigateTo(1)">
<label translate="{{vm.translationKeys[1]}}" ng-class="{'hasRequests': vm.programHasRequests == false && vm.currentStepNumber != 1}"></label>
</div>
</li>
<li>
<div ng-click="vm.navigateTo(2)">
<label translate="{{vm.translationKeys[2]}}" ng-class="{'hasRequests': vm.hasRequestIdInUrl == false}"></label>
</div>
</li>
<li id="last">
<div ng-click="vm.navigateTo(3)">
<label translate="{{vm.translationKeys[3]}}" ng-class="{'hasRequests': vm.hasRequestIdInUrl == false}"></label>
</div>
</li>
Is there a way to get the ng-disabled working on the list-items because now I can still click on the list-items even when the ng-class is applied.
Thanks for helping,
Greetings, Brent