I think this might do the trick:
<button class="btn" ng-click="isCollapsed = !isCollapsed">
<i ng-class="{'icon-resize-small': isCollapsed, 'icon-fullscreen': !isCollapsed}"></i>Details
</button>
In this case, your i
would have the class icon-resize-small
when isCollapsed
is true, and icon-fullscreen
when it's not true. Here is the documentation.
When passing an object of key-value pairs to ngClass, the keys represent classes which will be applied if their values evaluate to true.