Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
ngx-stepper
Advanced tools
Angular Steppers directive for Angular Material
Based on Material Steppers: https://www.google.com/design/spec/components/steppers.html#steppers-types-of-steppers
http://embed.plnkr.co/n1Ye3pQY6dlMSoJizO6Y/
You can try out the Angular Steppers in the demo app built with Angular-CLI.
npm install -g angular-cli@latest
npm install
ng serve
npm i -S ngx-stepper
note: works with angular 2 & 4
import { NgxStepperModule } from 'ngx-stepper';
@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule,
NgxStepperModule
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }
<ngx-stepper #stepperDemo="stepper" [options]="options">
<ngx-step [label]="'Select a campaign'">
<ngx-step-body>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Consectetur nobis saepe facere suscipit atque,
sapiente, natus mollitia ipsum odit accusamus repellendus deserunt. Odio sit similique, labore maxime
voluptatibus, eaque autem!</p>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Consectetur nobis saepe facere suscipit atque,
sapiente, natus mollitia ipsum odit accusamus repellendus deserunt. Odio sit similique, labore maxime
voluptatibus, eaque autem!</p>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Consectetur nobis saepe facere suscipit atque,
sapiente, natus mollitia ipsum odit accusamus repellendus deserunt. Odio sit similique, labore maxime
voluptatibus, eaque autem!</p>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Consectetur nobis saepe facere suscipit atque,
sapiente, natus mollitia ipsum odit accusamus repellendus deserunt. Odio sit similique, labore maxime
voluptatibus, eaque autem!</p>
</ngx-step-body>
<ngx-step-actions>
<button md-button class="md-primary md-raised" (click)="selectCampaign()">Continue</button>
<button md-button class="md-primary" (click)="stepper.back()">Cancel</button>
</ngx-step-actions>
</ngx-step>
<ngx-step [label]="'Publish the ad'">
<ngx-step-body>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Consectetur nobis saepe facere suscipit atque,
sapiente, natus mollitia ipsum odit accusamus repellendus deserunt. Odio sit similique, labore maxime
voluptatibus, eaque autem!</p>
</ngx-step-body>
<ngx-step-actions>
<button md-button class="md-primary md-raised" (click)="stepper.next()">Complete</button>
<button md-button class="md-primary" (click)="stepper.back()">Back</button>
</ngx-step-actions>
</ngx-step>
options attribute
Value of the options attribute is a type of StepperOptions. It can contain the following properties.
Detailed property bellow:
Options | Default | Type | Description |
---|---|---|---|
vertical | false | boolean | |
linear | true | boolean | |
alternative | true | boolean | |
mobileStepText | true | boolean | |
labelStep | 'Step' | string | |
labelOf | 'Of' | string | |
enableSvgIcon | false | boolean |
Used to control a stepper by it's id. Example:
@ViewChild('stepperDemo')
public steppers: NgxStepperComponent;
public selectCampaign(): void {
this.steppers.showFeedback('Checking, please wait ...');
this.steppers.next();
}
Detailed service operations bellow:
Method | Description | Returns |
---|---|---|
next() | Complete the current step and move one to the next. Using this method on editable steps (in linear stepper) it will search by the next step without "completed" state to move. When invoked it dispatch the event onstepcomplete to the step element. | boolean - True if move and false if not move (e.g. On the last step) |
back() | Move to the previous step without change the state of current step. Using this method in linear stepper it will check if previous step is editable to move. | boolean - True if move and false if not move (e.g. On the first step) |
skip() | Move to the next step without change the state of current step. This method works only in optional steps. | boolean - True if move and false if not move (e.g. On non-optional step) |
goto(stepNumber: number) | Move "active" to specified step id parameter. The id used as reference is the integer number shown on the label of each step (e.g. 2). | boolean - True if move and false if not move (e.g. On id not found) |
error(message: string) | Defines the current step state to "error" and shows the message parameter on title message element.When invoked it dispatch the event onsteperror to the step element. | {string} message The error message |
clearError() | Defines the current step state to "normal" and removes the message parameter on title message element. | void |
showFeedback(message?: string) | Shows a feedback message and a loading indicador. | void |
clearFeedback() | Removes the feedback. | void |
import {DomSanitizer} from '@angular/platform-browser';
import {MdIconRegistry} from '@angular/material';
public options: StepperOptions = {
enableSvgIcon: true
};
constructor(private _iconRegistry: MdIconRegistry,private _sanitizer: DomSanitizer) {}
public ngOnInit(): void {
this._iconRegistry
.addSvgIcon('step-done', this._sanitizer.bypassSecurityTrustResourceUrl('YOUR_ICON_URL'));
this._iconRegistry
.addSvgIcon('step-warning', this._sanitizer.bypassSecurityTrustResourceUrl('YOUR_ICON_URL'));
}
Based on:
Thanks to all ;)
FAQs
Angular Steppers directive for Angular Material
The npm package ngx-stepper receives a total of 280 weekly downloads. As such, ngx-stepper popularity was classified as not popular.
We found that ngx-stepper demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.