New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

step-progress-bar

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

step-progress-bar

Simple step progress bar for angular 6+

latest
Source
npmnpm
Version
1.0.2
Version published
Maintainers
1
Created
Source

Step Progress Bar


A very simple step progress bar for angular

Features

  • Step success style
  • Step fail style
  • Steps reseting

Dependencies

Angular 6 or higher

Install

npm i step-progress-bar

Setup

Add to NgModule: add StepProgressBarModule to desired NgModule,

import { CommonModule } from '@angular/common';

import {StepProgressBarModule} from 'step-progress-bar'

@NgModule({
  imports: [
    CommonModule,
    StepProgressBarModule // StepProgressBarModule added
  ],
  bootstrap: [App],
  declarations: [App]
})
class MainModule {}

Use

Add redesprou-step-progress-bar in desired hmtl page, providing the desired number of steps

...
<div>
    <redesprou-step-progress-bar steps="5"></redesprou-step-progress-bar>
</div>
...

Create a ViewChild for StepProgressBarComponent and call is methods as needed

import { StepProgressBarComponent } from 'step-progress-bar/lib/step-progress-bar/step-progress-bar.component';

@Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
})
export class AppComponent {

  @ViewChild(StepProgressBarComponent, {static: false}) stepProgressBarComponent: StepProgressBarComponent;

  success() {
    this.stepProgressBarComponent.setSuccess();
  }

  fail() {
    this.stepProgressBarComponent.setFail();
  }

  reset() {
    this.stepProgressBarComponent.reset();
  }
}

Options

OptionDescription
stepThe number of steps in this progress bar

Functions

setSuccess():void

Advances one step, setting current step as "SUCESS" Do nothing if last step is alredy set

setFail():void

Advances one step, setting current step as "FAIL" Do nothing if last step is alredy set

reset():void

Resets to the first step, setting all steps as "PENDENT"

License

MIT

GitHub @erivanbarbosa  · 

FAQs

Package last updated on 10 Mar 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts