mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-20 20:33:32 +08:00
fix(slides): Removing a slide via *ngIf now properly removes the slide and the bullet from the pager. (closes #6651)
This commit is contained in:
@ -902,13 +902,17 @@ export class Slide {
|
|||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
elementRef: ElementRef,
|
elementRef: ElementRef,
|
||||||
@Host() slides: Slides
|
@Host() private slides: Slides
|
||||||
) {
|
) {
|
||||||
this.ele = elementRef.nativeElement;
|
this.ele = elementRef.nativeElement;
|
||||||
this.ele.classList.add('swiper-slide');
|
this.ele.classList.add('swiper-slide');
|
||||||
|
|
||||||
slides.rapidUpdate();
|
slides.rapidUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ngOnDestroy() {
|
||||||
|
this.slides.rapidUpdate();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user