mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-19 19:57:22 +08:00
feat(angular): strongly type Ionic lifecycle hooks (#18044)
closes #18043
This commit is contained in:

committed by
GitHub

parent
29d208de88
commit
53fc8e37c8
@ -36,6 +36,9 @@ export { GestureController } from './providers/gesture-controller';
|
||||
// ROUTER STRATEGY
|
||||
export { IonicRouteStrategy } from './util/ionic-router-reuse-strategy';
|
||||
|
||||
// TYPES
|
||||
export * from './types/ionic-lifecycle-hooks';
|
||||
|
||||
// PACKAGE MODULE
|
||||
export { IonicModule } from './ionic-module';
|
||||
|
||||
|
31
angular/src/types/ionic-lifecycle-hooks.ts
Normal file
31
angular/src/types/ionic-lifecycle-hooks.ts
Normal file
@ -0,0 +1,31 @@
|
||||
/**
|
||||
* https://ionicframework.com/docs/api/router-outlet#life-cycle-hooks
|
||||
*/
|
||||
|
||||
export interface ViewWillEnter {
|
||||
/**
|
||||
* Fired when the component routing to is about to animate into view.
|
||||
*/
|
||||
ionViewWillEnter(): void;
|
||||
}
|
||||
|
||||
export interface ViewDidEnter {
|
||||
/**
|
||||
* Fired when the component routing to has finished animating.
|
||||
*/
|
||||
ionViewDidEnter(): void;
|
||||
}
|
||||
|
||||
export interface ViewWillLeave {
|
||||
/**
|
||||
* Fired when the component routing from is about to animate.
|
||||
*/
|
||||
ionViewWillLeave(): void;
|
||||
}
|
||||
|
||||
export interface ViewDidLeave {
|
||||
/**
|
||||
* Fired when the component routing to has finished animating.
|
||||
*/
|
||||
ionViewDidLeave(): void;
|
||||
}
|
Reference in New Issue
Block a user