Closed Khvesiuk closed 4 years ago
You can use svgIconOverrides
to override default icons.
example?
okay, here is my working example: app.components.ts
import { MatIconRegistry } from '@angular/material';
constructor(iconRegistry: MatIconRegistry) {
iconRegistry
.addSvgIcon('custom-back', sanitizer.bypassSecurityTrustResourceUrl('../assets/arrow_back.svg'))
.addSvgIcon('custom-forward', sanitizer.bypassSecurityTrustResourceUrl('../assets/arrow_forward.svg'))
}
carousel.component.ts
export class CarouselComponent {
iconOverrides: SvgIconOverrides = {
arrowForward: 'custom-forward',
arrowBack: 'custom-back'
}
}
carousel.component.html
<mat-carousel
[hideIndicators]="false"
[svgIconOverrides]="iconOverrides">
<mat-carousel-slide></mat-carousel-slide>
</mat-carousel>
Thanks for your patience, @Khvesiuk, as I could not provide an example. I'll try to add your example to the README.
Expected something like this? But not...