1.0.0 • Published 7 years ago

ionic-progress-bar v1.0.0

Weekly downloads
53
License
MIT
Repository
github
Last release
7 years ago

ionic-progress-bar

Simple progress bar alert for Ionic3

Installation

npm i ionic-progress-bar --save

Setup

First, import IonicSimpleProgressBarModule and SimpleProgressBarProvider to your app.module.ts that is normally located in src\app\app.module.ts.

import { IonicSimpleProgressBarModule, SimpleProgressBarProvider } from 'ionic-progress-bar';

@NgModule({
  imports: [
    IonicSimpleProgressBarModule.forRoot()
  ],
  providers:[
    SimpleProgressBarProvider
  ]
})
export class AppModule { }

Usage

Add the SimpleProgressBarProvider to your component

import {SimpleProgressBarProvider } from 'ionic-progress-bar';

Add the provider to your component constructor

constructor(
   private _progressBar: SimpleProgressBarProvider
)

Use it

this._progressBar.present("Starting sync", 5).subscribe(
    () => {
        ....
        this._progressBar.setMilestone("Sync process 1");
        ....
        this._progressBar.setMilestone("Sync process 2");
        ....
        this._progressBar.setMilestone("Sync process 3");
        ....
        this._progressBar.setMilestone("Sync process 4");
        ....
        this._progressBar.setMilestone("Sync process 5");
        ....
        this._progressBar.dismiss();
    },
    (err) => {
        console.error(err);
    }
);
1.0.0

7 years ago

0.0.16

7 years ago

0.0.15

7 years ago

0.0.14

7 years ago

0.0.13

7 years ago

0.0.12

7 years ago

0.0.11

7 years ago

0.0.10

7 years ago

0.0.9

7 years ago

0.0.8

7 years ago

0.0.7

7 years ago

0.0.6

7 years ago

0.0.5

7 years ago

0.0.4

7 years ago

0.0.3

7 years ago

0.0.1

7 years ago