when using Admin-LTE 3.0 with AngularJS, for unknown reason catching the event expanded.lte.cardwidget failed. As an alternative, I have to add ng-click to the button
<button type="button" class="btn btn-tool"
data-card-widget="collapse"
ng-click="bbtest($event)"><i class="fas fa-minus"></i>
</button>
and bbtest function is listed below:
bbtest(eve) {
let box = $(eve.target).first();
if (!box.hasClass('fa-minus')) {//expanding
setTimeout(() => {//expansion has animation
console.log(`doing sth`);
}, 500);
}
}