将事件和数据从离子选项卡子项传递给父项

时间:2021-02-23 15:08:08

标签: android angular typescript ionic-framework

我有一个定义标签栏的父页面。我有 2 个子页面到这个标签栏。我想从孩子那里捕获滚动事件并在滚动时隐藏标签栏。如何将离子内容滚动事件或任何数据从子页面传递到包含标签栏的父页面?

  <ion-tab-bar slot="bottom" #tab>
    <ion-tab-button tab="open">
      <ion-icon name="folder-open"></ion-icon>
      <ion-label>Open Items</ion-label>
    </ion-tab-button>

    <ion-tab-button tab="closed">
      <ion-icon name="checkmark"></ion-icon>
      <ion-label>Closed Items</ion-label>
    </ion-tab-button>
  </ion-tab-bar>
</ion-tabs>````

0 个答案:

没有答案