Package Exports
- @lithiumjs/ionic
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@lithiumjs/ionic) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Lithium for Ionic
Reactive Ionic navigation lifecycle decorators 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({...})
@Reactive()
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(): EventSourceDecorator
ViewWillEnter
function ViewWillEnter(): EventSourceDecorator
ViewDidEnter
function ViewDidEnter(): EventSourceDecorator
ViewWillLeave
function ViewWillLeave(): EventSourceDecorator
ViewDidLeave
function ViewDidLeave(): EventSourceDecorator
ViewWillUnload
function ViewWillUnload(): EventSourceDecorator