gbrlsnchs / material2-carousel

A carousel component for Angular using Material
https://gsr.dev/material2-carousel
MIT License
85 stars 118 forks source link

Does it work with Angular Universal with Server Side Render? #42

Open Khvesiuk opened 4 years ago

Khvesiuk commented 4 years ago

When I'm including CarouselComponent on MainPage of the project, it is just freeze everything. Server is not responding. There is no any warning in Node.js console. But it works fine, when browser generate content. For example if move CarouselComponent to AboutPage, and routing from MainPage to AboutPage. But if I'm trying to refresh About (Server Side Render), same result.

Khvesiuk commented 4 years ago

this is not good, but it is work: <app-carousel *ngIf="isBrowser" [items]="asset.items"></app-carousel>

Twois commented 4 years ago

I got the same issue. A fast workaround if you set the

[autoplay]="false"

I set it based on the platform, so if the platform is server than false, else true.

My suggestion is to this should be handled by this module behind the screen.