Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

content: The IonSlides Angular migration guide should have "Notes" about the breaking change on Event handling

オープン
#2,734 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
1/5
見積もり時間
1〜3時間
初心者へのやさしさ
48/100
issue の種類
ドキュメント
明瞭さ
明確に書かれている
活発さ
停滞
技術スタック
angular
領域
documentation

調査の方向性

Angular の移行ガイドを、ドキュメントに記載されている slides の Events セクションで開き、イベント処理に関する説明を、リンクされている Swiper Angular のドキュメントと比較します。Swiper のイベントが NgZone の外部で実行されることを説明し、ngZone.run または change detection が必要になる場合を説明する注記を追加します。ガイド内で breaking change が明確になれば完了です。

索引モデルが issue の本文から書いたものです。

説明

content
URL

https://ionicframework.com/docs/angular/slides#events

Issue Description

When following the migration guide to switch using Swiper instead of IonSlides, I found one breaking change.
That is the triggered event is no longer part of NgZone.
This is also mentioned in the Swiper document.
https://swiperjs.com/angular#swiper-component-events

Note that Swiper Angular component all events emits outside of NgZone for better perfomance. Dont forget to use ngzone.run or ChangeDetector if you need to change view (e.g slides) in event handlers (e.g slideChange).

I think this should also be mentioned in the Ionic docs.

Below is a small sample:
In HTML, I put a testVariable both inside and outside of Swiper.

{{testVariable}}
  <swiper 
    [config]="config"
    (slideChangeTransitionEnd)="onSlideChange()">
    <ng-template swiperSlide>Slide1, {{testVariable}}</ng-template>
    <ng-template swiperSlide>Slide2 {{testVariable}}</ng-template>
    <ng-template swiperSlide>Slide3  {{testVariable}}</ng-template>
  </swiper>

In component code, if I don't surround the code with ngZone.run, only the testVariable inside Swiper is updating, the one outside of Swiper never changes. IonSlides doesn't have such behavior change.

  onSlideChange() {
    this.ngZone.run(() => {
      this.testVariable++;      
    });
  }
主要言語
MDX
スター
621
フォーク
3.2k
平均マージ
1日 6時間
マージ済み PR(30日)
65

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

ionic-team/ionic-docs のほかの issue

ionic-team/ionic-docs の issue をすべて見る

似ている issue

Documentation の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。