I'm using Angular 1.2 and bootstrap 3.x and I'm trying to collapse DIV using angular-bootstrap plugin. I have form with search bar that retrieves specific data from a server in the controller using my custom $resource service:
$scope.sendSearch = function(query) {
$scope.results = Search.query(query);
};
And I would like to un-collapse my results after retrieving them using this piece of code:
<div collapse="isCollapsed">
<li class="well" ng-repeat="result in results" style="list-style-type: none;">
</li>
</div>
I am able to to so after the data is retrieved by adding simple button with correct ng-click action, but my question is - is it possible to change the value of "isCollapsed" variable in the controller? I am aware that because of the "promise" nature of the response it could be problematic. When I tried to do so, my div freezed with class="collapsing" and nothing happened, hovewer - I was still able to collapse/uncollapse div using aforementioned button, which fixed class attribute too.