Consider that you are building a shopping cart application by using AngularJS. Which of the following statements about the given code snippet are correct?
<div class="right">
<i class="fa fa-check" ng-show="!item_striken$index" ng-click='item_striken$index =
titem_striken$index"></i>
<i class="fa fa-times" ng-show="item_striken$index" ng-click="item_striken$index =
litem_striken$index"></i>
<i class="fa fa-trash“ ng-click="de|eteltem($index)"></i>
</div>
1. The item_striken$index instance denotes each item in the list. Here, the index refers to the index of the array. This is the index that we passed to delete the function earlier.
2. The ng-show directive shows or hides the element based on the given condition. The value of the item_striken$index instance changes on click. Based on true or false, tick or cross is displayed.
3. In span, the ng-class:"[striken : item_striken$index]” statement will add the striken class to span, if item_striken$index is false.
Correct Answer:
Both 1 and 2
Explanation:
Note: This Question is unanswered, help us to find answer for this one
More Angular JS MCQ Questions