When I click on one of the divs inside my ng-repeat it runs a function. And it opens that div so that you get more information about it. When I click on another div inside my ng-repeat. It will close all the other divs and open the selected one.

How can I say when I click on the same div when its opend it also close that div so that all the divs are closed.

Here is my Code:

Angular:

```
   $scope.setSelected = function(index) {
        $scope.selectedIndex = index;
    };

```

html:

```
ng-click="setSelected($index);" ng-class="{ 'selectedBox': $index == selectedIndex }"

```