Skip to content

Commit

Permalink
fix(angular): don't set main class on wrapper element
Browse files Browse the repository at this point in the history
fixes #4679
  • Loading branch information
nolimits4web committed Jun 16, 2021
1 parent 8711bb9 commit 1285195
Showing 1 changed file with 14 additions and 31 deletions.
45 changes: 14 additions & 31 deletions src/angular/src/swiper.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,66 +5,49 @@
</ng-container>
<div *ngIf="scrollbar && showScrollbar" class="swiper-scrollbar" #scrollbarElRef></div>
<div *ngIf="pagination && showPagination" class="swiper-pagination" #paginationElRef></div>
<div [ngClass]="[wrapperClass, class].join(' ')" [attr.id]="id">
<div [ngClass]="wrapperClass" [attr.id]="id">
<ng-content select="[slot=wrapper-start]"></ng-content>
<ng-template
*ngTemplateOutlet="
<ng-template *ngTemplateOutlet="
slidesTemplate;
context: {
loopSlides: prependSlides,
key: 'prepend'
}
"
></ng-template>
<ng-template
*ngTemplateOutlet="
"></ng-template>
<ng-template *ngTemplateOutlet="
slidesTemplate;
context: {
loopSlides: activeSlides,
key: ''
}
"
></ng-template>
<ng-template
*ngTemplateOutlet="
"></ng-template>
<ng-template *ngTemplateOutlet="
slidesTemplate;
context: {
loopSlides: appendSlides,
key: 'append'
}
"
></ng-template>
"></ng-template>
<ng-content select="[slot=wrapper-end]"></ng-content>
</div>
<ng-content select="[slot=container-end]"></ng-content>

<ng-template #slidesTemplate let-loopSlides="loopSlides" let-slideKey="key">
<div
*ngFor="let slide of loopSlides | async"
[ngClass]="
<div *ngFor="let slide of loopSlides | async" [ngClass]="
(slide.class ? slide.class + ' ' : '') +
slideClass +
(slideKey !== '' ? ' ' + slideDuplicateClass : '')
"
[attr.data-swiper-slide-index]="slide.virtualIndex ? slide.virtualIndex : slide.slideIndex"
[style]="style"
[ngSwitch]="slide.zoom"
>
" [attr.data-swiper-slide-index]="slide.virtualIndex ? slide.virtualIndex : slide.slideIndex" [style]="style"
[ngSwitch]="slide.zoom">
<div *ngSwitchCase="true" [ngClass]="zoomContainerClass">
<ng-template
[ngTemplateOutlet]="slide.template"
[ngTemplateOutletContext]="{
<ng-template [ngTemplateOutlet]="slide.template" [ngTemplateOutletContext]="{
$implicit: slide.slideData
}"
></ng-template>
}"></ng-template>
</div>
<ng-container *ngSwitchDefault>
<ng-template
[ngTemplateOutlet]="slide.template"
[ngTemplateOutletContext]="{
<ng-template [ngTemplateOutlet]="slide.template" [ngTemplateOutletContext]="{
$implicit: slide.slideData
}"
></ng-template>
}"></ng-template>
</ng-container>
</div>
</ng-template>

0 comments on commit 1285195

Please sign in to comment.