'material2-carousel change css class to current slide

I use angular with material2-carousel

I want add text animation, that mean that when change the slide the text showed with animation, for this I need change the current slide and I want to know if I can add css class to the current slide

this is my code

 <mat-carousel
            #matCarouselSlide
            (change)="onChange($event)"
            class="col-sm-12" timings="250ms ease-in" [autoplay]="true" interval="7000" color="#00000040"
                maxWidth="auto" proportion="35" slides="9" [loop]="true" [hideArrows]="false" [hideIndicators]="true"
                [useKeyboard]="true" [useMouseWheel]="false" orientation="ltr">
                <!-- @carouselAnimation -->
                <mat-carousel-slide   #matCarouselSlide *ngFor="let slide of randomList; let i = index"
                    [image]="slide.img" overlayColor="#00000040" [hideOverlay]="true">
                    <h1 class="SlideText">{{slide.title}}</h1>
                </mat-carousel-slide>
            </mat-carousel>


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source