Adding animations to ngClass with JavaScript