Skip to content
This repository has been archived by the owner on Sep 26, 2020. It is now read-only.

mat-carousel-slide does not update when source changes. #64

Open
HDeiro opened this issue May 13, 2020 · 0 comments
Open

mat-carousel-slide does not update when source changes. #64

HDeiro opened this issue May 13, 2020 · 0 comments

Comments

@HDeiro
Copy link

HDeiro commented May 13, 2020

In order to optimize my project I'm using responsive images based on the size of the screen. Currently seems like when I change the image source it does not update the mat-carousel-slide.

<mat-carousel
  #carousel
  [autoplay]="false"
  [maintainAspectRatio]="false">
  <mat-carousel-slide
    *ngFor="let item of items"
    [image]="item[propertyToBeUsed]"
    overlayColor="#00000020">
  </mat-carousel-slide>
</mat-carousel>

item is an object with 3 properties, big, medium and small. It will be changed based on propertyToBeUsed, that changes based on the size of the screen.

I think this should be fixed.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant