@lithiumjs/ionic
TypeScript icon, indicating that this package has built-in type declarations

2.0.0 • Public • Published

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.

Package Sidebar

Install

npm i @lithiumjs/ionic

Weekly Downloads

3

Version

2.0.0

License

MIT

Unpacked Size

10.3 kB

Total Files

9

Last publish

Collaborators

  • lvlyke