title: How to call a function when angularjs accordion open only
body: <p>Hi I am using angularjs ui bootstrap accordion. Here i want to call when user click on accordion call one function and get user </p>
  
  <p>Here is the code please help me thnks in advance</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>$scope.load_userdata= function(user_id) {
       console.log(user_id);
      }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;uib-accordion close-others="oneAtATime"&gt;
    &lt;div uib-accordion-group class="panel-default" ng-repeat="user in users"&gt;
       &lt;uib-accordion-heading ng-click="load_userdata(user.id)"&gt;
         &lt;div class="table"&gt;
          &lt;div style="width: 50%"&gt;
             @{{user.name}}             
          &lt;/div&gt;
          &lt;div&gt;
            Load user data
           &lt;/div&gt;
         &lt;/div&gt;
         &lt;/uib-accordion-heading&gt;
    &lt;/div&gt;
  &lt;/uib-accordion&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>data and display it  </p>