Question from the AngularJS test

How to remove an item from an array in AngularJS

Hard

Given the following situation:

$scope.items = [{
   name : 'item1'
}, {
   name : 'item2'
}, {
   name : 'item3'
}];

And:

<div ng-repeat="item in items" ng-click="hide = !hide" ng-hide="hide">
   {{item.name}}
</div>

I click on "item1", what happens?

Author: Mathieu RobinStatus: PublishedQuestion passed 98 times
Edit
0
Community EvaluationsNo one has reviewed this question yet, be the first!