title: Dynamic content hidden in Angular Bootstrap accordion
body: <p>I have an accordion that renders dynamic content.  My app does not include ngAnimate as animations are not wanted by the client.  However, I am seeing an issue where dynamic content is hidden when ngAnimate is not included.  When it is added back, the content renders fine.  The scenario is that you expand an accordion element.  From there, you can execute an action that will render dynamic content underneath the action within the accordion body.  The content will be cut off once it goes past the height of the accordion body.  Collapsing and expanding the accordion element will force a recalculation of the body and everything will be displayed correctly.  I've created a <a href="http://plnkr.co/edit/y81e62ZXRnCeFRSrazzS?p=preview" rel="noreferrer">Plunker</a> to demonstrate the issue.  </p>
  
  <p>Java Script code:</p>
  
  <pre><code>    angular.module('ui.bootstrap.demo', ['ui.bootstrap']);
  angular.module('ui.bootstrap.demo').controller('AccordionDemoCtrl', function ($scope) {
    $scope.oneAtATime = true;
    $scope.blah = ['blah'];
    $scope.view = false;
  
  
    $scope.status = {
      isFirstOpen: true,
      isFirstDisabled: false
    };
  });
  
  angular.module('ui.bootstrap.demo').directive('mydir',['$compile',function($compile){
    return{
      link:function(scope, element, attrs){
        scope.changeMe = function(){
      scope.blah.push('Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed tortor mi, molestie sit amet malesuada quis, mollis in mi. Aenean non lacus vel tortor sodales efficitur et in lectus. Aliquam erat volutpat. Nunc orci lectus, volutpat sed bibendum et, auctor id lacus. Suspendisse scelerisque lacinia turpis quis semper. Suspendisse metus tellus, finibus sit amet sollicitudin id, venenatis in urna. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Mauris porttitor neque luctus, maximus ligula nec, tincidunt ipsum. Maecenas fringilla consequat nibh blandit rutrum. Etiam sed blandit ipsum, eu pretium mauris. Cras eget mauris ipsum. Vestibulum eu sodales diam.' +
  'Integer tempus turpis sed malesuada pellentesque. Nam lacus eros, interdum a enim eget, consectetur auctor odio. Cras sit amet erat placerat, condimentum ante a, tempor dolor. Aenean vulputate augue quis erat finibus lobortis. Aenean sit amet elit tincidunt, elementum lorem et, aliquet quam. Sed vitae odio lobortis, lobortis lectus et, interdum arcu. Morbi faucibus eget turpis fermentum euismod. Nunc ullamcorper, metus id pretium sodales, turpis neque fringilla tellus, sed molestie neque justo eu mauris. Aenean iaculis ligula sed lacinia efficitur.' +
  
  'Vivamus dolor mi, feugiat porttitor mollis sed, aliquam non nisi. Proin gravida augue risus, a faucibus magna tincidunt eget. Pellentesque bibendum gravida commodo. Cras sagittis, odio eget rhoncus ornare, lorem enim aliquam augue, id efficitur dui tortor at risus. Mauris enim erat, faucibus vel dictum sit amet, hendrerit sollicitudin eros. Cras condimentum dapibus augue. Ut ornare fringilla metus sollicitudin tempus. Vivamus sit amet pharetra urna.' +
  
  'Suspendisse potenti. Integer eget vestibulum augue. Donec imperdiet arcu sit amet dui tincidunt sagittis sed eget arcu. Aliquam scelerisque non eros sed tincidunt. Vivamus non orci sed orci facilisis fringilla at ac eros. Integer vitae enim non lacus bibendum aliquet. Nullam congue convallis nulla, sed mattis enim dictum vel. Mauris in ante a libero gravida maximus et at lorem.' +
  
  'Aenean commodo tempor felis, eget tincidunt erat fringilla a. Curabitur efficitur pulvinar tristique. Proin et euismod ex. Praesent et tortor et nisl posuere dapibus. Mauris arcu urna, aliquet id dignissim quis, pellentesque at velit. Ut tempus justo risus, non ultrices metus volutpat quis. Aliquam sit amet condimentum justo, id suscipit mi. Praesent laoreet elementum nibh, eu consectetur felis volutpat eu. Nulla auctor cursus ipsum, finibus porta leo aliquet eget. Donec in pulvinar nunc. Proin ultrices, purus sit amet finibus ornare, nisl justo faucibus arcu, et cursus ante arcu sit amet augue.;');
    };
        var template = '&lt;button type="button" class="btn btn-default btn-sm" ng-click="changeMe()"&gt;Add content below&lt;/button&gt;&lt;div ng-repeat="stuff in blah track by $index"&gt;&lt;div ng-if="stuff.length &gt; 5"&gt;{{stuff}}&lt;/div&gt;&lt;/div&gt;';
        element.empty();
        element.html(template);
        $compile(element.contents())(scope);
      },
      restrict:'E'
    }
  
  }]);
  </code></pre>
  
  <p>HTML markup:</p>
  
  <pre><code>    &lt;!doctype html&gt;
  &lt;html ng-app="ui.bootstrap.demo"&gt;
    &lt;head&gt;
      &lt;script src="//ajax.googleapis.com/ajax/libs/angularjs/1.4.7/angular.js"&gt;&lt;/script&gt;
      &lt;script src="//ajax.googleapis.com/ajax/libs/angularjs/1.4.7/angular-animate.js"&gt;&lt;/script&gt;
      &lt;script src="//angular-ui.github.io/bootstrap/ui-bootstrap-tpls-0.14.2.js"&gt;&lt;/script&gt;
      &lt;script src="example.js"&gt;&lt;/script&gt;
      &lt;link href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" rel="stylesheet"&gt;
    &lt;/head&gt;
    &lt;body&gt;
  
  &lt;div ng-controller="AccordionDemoCtrl"&gt;
    &lt;script type="text/ng-template" id="group-template.html"&gt;
      &lt;div class="panel {{panelClass || 'panel-default'}}"&gt;
        &lt;div class="panel-heading"&gt;
          &lt;h4 class="panel-title" style="color:#fa39c3"&gt;
            &lt;a href tabindex="0" class="accordion-toggle" ng-click="toggleOpen()" uib-accordion-transclude="heading"&gt;&lt;span
              ng-class="{'text-muted': isDisabled}"&gt;{{heading}}&lt;/span&gt;&lt;/a&gt;
          &lt;/h4&gt;
        &lt;/div&gt;
        &lt;div class="panel-collapse collapse" uib-collapse="!isOpen"&gt;
          &lt;div class="panel-body" style="text-align: right" ng-transclude&gt;&lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/script&gt;
    &lt;p&gt;This demonstrates a hidden content issue when ng-animate is not present.&lt;/p&gt;
    &lt;p&gt;Click "Add content below".  It will be mostly hidden.  Then collapse and expand Header 1.  The body will be recalculated and everything will be visible.&lt;/p&gt;
  
    &lt;uib-accordion close-others="false"&gt;
      &lt;uib-accordion-group ng-init="status.open=true" is-open="status.open"&gt;
        &lt;uib-accordion-heading&gt;
          Header 1 - My dynamic content will disappear. &lt;i class="pull-right glyphicon" ng-class="{'glyphicon-chevron-down': status.open, 'glyphicon-chevron-right': !status.open}"&gt;&lt;/i&gt;
        &lt;/uib-accordion-heading&gt;
        &lt;div&gt;&lt;mydir&gt;&lt;/mydir&gt;&lt;/div&gt;
      &lt;/uib-accordion-group&gt;
      &lt;uib-accordion-group is-open="status.isFirstOpen"&gt;
        &lt;uib-accordion-heading&gt;
          Header 2 &lt;i class="pull-right glyphicon" ng-class="{'glyphicon-chevron-down': status.isFirstOpen, 'glyphicon-chevron-right': !status.isFirstOpen}"&gt;&lt;/i&gt;
        &lt;/uib-accordion-heading&gt;
        This content is straight in the template.
      &lt;/uib-accordion-group&gt;
  
  
    &lt;/uib-accordion&gt;
  &lt;/div&gt;
    &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Unless I am misunderstanding the Angular-UI Boostrap <a href="https://github.com/angular-ui/bootstrap#installation" rel="noreferrer">documentation</a>, you only need to ngAnimate if you want animations.</p>
  
  <p>Has anyone come across this before and found a solution?  Is there an additional options that need to be set when animations are to be disabled?  I noticed that transitions are still present even when ngAnimate is not included.</p>