diff --git a/src/collapse/collapse.js b/src/collapse/collapse.js index 00d1e31ec0..a24771898d 100644 --- a/src/collapse/collapse.js +++ b/src/collapse/collapse.js @@ -4,7 +4,17 @@ angular.module('ui.bootstrap.collapse', []) var $animateCss = $injector.has('$animateCss') ? $injector.get('$animateCss') : null; return { link: function(scope, element, attrs) { + if (!scope.$eval(attrs.uibCollapse)) { + element.addClass('in') + .addClass('collapse') + .css({height: 'auto'}); + } + function expand() { + if (element.hasClass('collapse') && element.hasClass('in')) { + return expandDone(); + } + element.removeClass('collapse') .addClass('collapsing') .attr('aria-expanded', true)