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