/
githubmirror
/
ionic
Обзор
Документация
Войти
/
githubmirror
/
ionic
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
packages/angular/test/base/src/app/lazy/tabs/tabs.component.ts
34 строки
982 B
Brandy Carney
test(angular): add ng19 test app (#30041)
04 дек 2024, 20:02
Не верифицирован
04 дек 2024, 20:02
e101f2e
Код
Авторство
О чём код?
import { Component, OnInit, ViewChild } from '@angular/core'; import { IonTabBar } from '@ionic/angular'; @Component({ selector: 'app-tabs', templateUrl: './tabs.component.html', styleUrls: ['./tabs.component.css'], standalone: false }) export class TabsComponent { tabsDidChangeCounter = 0; tabsDidChangeEvent = ''; tabsDidChangeSelectedTab? = ''; tabsWillChangeCounter = 0; tabsWillChangeEvent = ''; tabsWillChangeSelectedTab? = ''; @ViewChild(IonTabBar) tabBar!: IonTabBar; tabChanged(ev: { tab: string }) { console.log('ionTabsDidChange', this.tabBar.selectedTab); this.tabsDidChangeCounter++; this.tabsDidChangeEvent = ev.tab; this.tabsDidChangeSelectedTab = this.tabBar.selectedTab; } tabsWillChange(ev: { tab: string }) { console.log('ionTabsWillChange', this.tabBar.selectedTab); this.tabsWillChangeCounter++; this.tabsWillChangeEvent = ev.tab; this.tabsWillChangeSelectedTab = this.tabBar.selectedTab; } }