Reactive Ionic navigation lifecycle extensions for @lithiumjs/angular.
Lithium for Ionic depends on Lithium for Angular. Both can be installed via npm using the following command:
npm install @lithiumjs/angular @lithiumjs/ionic
@Component({...})
class IonicPage {
@ViewDidEnter() private viewDidEnter$: Observable<void>;
constructor () {
this.viewDidEnter$.subscribe(() => console.log("View was entered."));
}
}
These decorators create observables for all Ionic navigation lifecycle events:
function ViewDidLoad(options?: EventSource.DecoratorOptions, ...methodDecorators: MethodDecorator[]): PropertyDecorator
See EventSource
.
function ViewWillEnter(options?: EventSource.DecoratorOptions, ...methodDecorators: MethodDecorator[]): PropertyDecorator
See EventSource
.
function ViewDidEnter(options?: EventSource.DecoratorOptions, ...methodDecorators: MethodDecorator[]): PropertyDecorator
See EventSource
.
function ViewWillLeave(options?: EventSource.DecoratorOptions, ...methodDecorators: MethodDecorator[]): PropertyDecorator
See EventSource
.
function ViewDidLeave(options?: EventSource.DecoratorOptions, ...methodDecorators: MethodDecorator[]): PropertyDecorator
See EventSource
.
function ViewWillUnload(options?: EventSource.DecoratorOptions, ...methodDecorators: MethodDecorator[]): PropertyDecorator
See EventSource
.