Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mat-icon svg content disappear in infinite mode #113

Open
mmart1n opened this issue Apr 11, 2024 · 0 comments
Open

mat-icon svg content disappear in infinite mode #113

mmart1n opened this issue Apr 11, 2024 · 0 comments

Comments

@mmart1n
Copy link

mmart1n commented Apr 11, 2024

I'm creating a carousel with help of the ngx-slick-carousel. Each of the slides contains a Material Card and within each card there are Material icons. When the carousel is not infinite, everything works as expected. However, when the carousel is infinite, once I reach the last slide and continue sliding right, the icons disappear. Actually the tag stays when I inspect the DOM but within it's content is missing. If I keep scrolling when I get to the first slide the icons appear again and the cycle repeats itself.

PS. I noticed that this happens only if I have registered the SVG icons like this:
this.iconRegistry.addSvgIcon('star', this.domSanitizer.bypassSecurityTrustResourceUrl('/assets/icons/star.svg'));.

If I register them like
this.iconRegistry.addSvgIconLiteral('thumbs-up', this.domSanitizer.bypassSecurityTrustHtml(THUMBUP_ICON));
they do not disappear.

Stackblitz sample -> here

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

No branches or pull requests

1 participant