/
githubmirror
/
ionic
Обзор
Документация
Войти
/
githubmirror
/
ionic
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
packages/angular/standalone/src/navigation/back-button.ts
28 строк
934 B
Liam DeBeasi
feat(angular): ship Ionic components as Angular standalone components (#28311)
10 окт 2023, 20:06
Не верифицирован
10 окт 2023, 20:06
57e2476
Код
Авторство
О чём код?
import { Component, Optional, ChangeDetectionStrategy, ElementRef, NgZone, ChangeDetectorRef } from '@angular/core'; import { IonBackButton as IonBackButtonBase, NavController, Config, ProxyCmp } from '@ionic/angular/common'; import { defineCustomElement } from '@ionic/core/components/ion-back-button.js'; import { IonRouterOutlet } from './router-outlet'; @ProxyCmp({ defineCustomElementFn: defineCustomElement, }) @Component({ selector: 'ion-back-button', changeDetection: ChangeDetectionStrategy.OnPush, template: '<ng-content></ng-content>', standalone: true, }) // eslint-disable-next-line @angular-eslint/directive-class-suffix export class IonBackButton extends IonBackButtonBase { constructor( @Optional() routerOutlet: IonRouterOutlet, navCtrl: NavController, config: Config, r: ElementRef, z: NgZone, c: ChangeDetectorRef ) { super(routerOutlet, navCtrl, config, r, z, c); } }