So I have this ng-repeat block that goes like this:
<ol>
<li class="pointer node-name" ng-click="myClick(node)" ng-repeat="node in myArray">{{node.name}}</li>
</ol>
It's all good and dandy, generating <li>
elements inside an <ol>
from myArray
.
But now, the tricky part - I want the last item in the ng-repeat
to not fire the ng-click
event or be somehow disabled.
For instance:
<ol>
<li class="pointer node-name" ng-click="myClick(node)" ng-repeat="node in myArray">Step 1</li>
<li class="pointer node-name" ng-click="myClick(node)" ng-repeat="node in myArray">Step 2</li>
<li class="pointer node-name" ng-click="myClick(node)" ng-repeat="node in myArray">Step 3</li>
<li class="pointer node-name" ng-click="myClick(node)" ng-repeat="node in myArray">Step 4</li>
<li class="pointer node-name" ng-repeat="node in myArray">Step 5</li>
</ol>
I wonder if something like this can even be achieved. Thanks for any help!