Accordion list. Opened all data


#1

I have data with json string and make accardeon list on this example http://codepen.io/ionic/pen/uJkCz.

But when i clicked on list opened all tree’s. What is wrong?

Here is my example: http://codepen.io/Serjonka/pen/yObRQL


#2
<html ng-app="ionicApp">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <title>Ionic Accordion</title>
   
    <link href="//code.ionicframework.com/nightly/css/ionic.css" rel="stylesheet">
    <script src="//code.ionicframework.com/nightly/js/ionic.bundle.js"></script>

  </head>

  <body ng-controller="MyCtrl">
    
    <ion-header-bar class="bar-positive">
      <h1 class="title">Факультети</h1>
    </ion-header-bar>

    <ion-content class="padding=2px">
        <ion-list>
            <div ng-repeat="id in data">
                <ion-item class="item-stable"
                          ng-click="toggleGroup(id.id)"
                          ng-class="{active: isGroupShown(id.id)}">
                    <i class="icon" ng-class="isGroupShown(id.id) ? 'ion-android-folder-open' : 'ion-android-folder'"></i>
                    &nbsp;
                    {{id.caption}}
                    <p></p>
                </ion-item>
                <ion-item  class="item-accordion"
                          ng-repeat="sm in id.items"
                          ng-show="isGroupShown(id.id)" a href="#" >
                         {{sm.caption}}
                    <p>{{sm.post_date}}</p>
                    <p>{{sm.item_type}}</p>
                </ion-item>
            </div>
        </ion-list>
      </ion-content>
      
  </body>
</html>