/
githubmirror
/
ionic-framework
Обзор
Документация
Войти
/
githubmirror
/
ionic-framework
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
packages/angular/test/base/src/app/lazy/tabs-slots.component.ts
32 строки
786 B
Liam DeBeasi
feat(angular): ship Ionic components as Angular standalone components (#28311)
10 окт 2023, 20:06
Не верифицирован
10 окт 2023, 20:06
57e2476
Код
Авторство
О чём код?
import { Component } from "@angular/core"; import { IonicModule } from "@ionic/angular"; /** * Test purpose: Validates that the tab bar is relocated to the * correct location when the slot attribute changes or is bound * to a variable. */ @Component({ selector: 'app-tabs-slots', template: ` <ion-tabs> <ion-tab-bar [slot]="slot"></ion-tab-bar> </ion-tabs> <ion-fab vertical="bottom" horizontal="end"> <button id="set-slot-top" (click)="setSlot('top')">Slot - top</button> <br /> <button id="set-slot-bottom"(click)="setSlot('bottom')">Slot - bottom</button> </ion-fab> `, imports: [IonicModule], standalone: true }) export class TabsSlotsComponent { slot?: string; setSlot(newSlot: string) { this.slot = newSlot; } }