Angular 角形万向猫头鹰转盘
有人有幸和Angular Universal一起运行owl-carousel-o吗?我尝试使用Angular 角形万向猫头鹰转盘,angular,owl-carousel,angular-universal,Angular,Owl Carousel,Angular Universal,有人有幸和Angular Universal一起运行owl-carousel-o吗?我尝试使用IsPlatformBrowser进行检查,但仍然不起作用 <ng-container *ngIf="ssrtype"> <owl-carousel-o [options]="customOptions" #owlCar> <ng-container *ngFor="let slide of product.im
IsPlatformBrowser
进行检查,但仍然不起作用
<ng-container *ngIf="ssrtype">
<owl-carousel-o [options]="customOptions" #owlCar>
<ng-container *ngFor="let slide of product.image">
<ng-template class="slide" carouselSlide [width]="300" [id]="slide">
<lib-ngx-image-zoom
thumbImage="{{slide}}"
fullImage="{{slide}}"
[magnification]="1"
[enableScrollZoom]="true"
[enableLens]="true"
[lensWidth]="200"
[lensHeight]="200"
></lib-ngx-image-zoom>
</ng-template>
</ng-container>
</owl-carousel-o>
</ng-container>
控制台中没有错误。下面是两张图片,用来比较它的外观:
在角宇宙之前
后角万向节
问题是什么?不渲染图像会留下空白并垂直拉伸页面,但这将是SSR页面首次渲染时。然后,当客户端启动时,您应该有图像,没有?@David不幸的是没有图像显示控制台中有任何错误吗?
if (isPlatformBrowser(this.platformId)) {
this.ssrtype = true;
}