Skip to content

Instantly share code, notes, and snippets.

@anjum121 anjum121/loaderService.ts
Last active Nov 30, 2016

What would you like to do?
loader service
import {Injectable} from '@angular/core';
import {LoadingController} from 'ionic-angular';
export interface ILoaderParams {
message?: string;
time?: number;
dismissOnPageChange?: boolean
export class LoaderService {
constructor(public loadingCtrl: LoadingController) {
show(param: ILoaderParams) {
this.loader = this.loadingCtrl.create({
content: param.message || "Please wait...",
duration: param.time,
dismissOnPageChange: param.dismissOnPageChange || true
hide() {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.