You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

ngx-queue-bar

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ngx-queue-bar

Display multiple snackbars in Angular

1.0.0
latest
Source
npmnpm
Version published
Weekly downloads
1
-50%
Maintainers
1
Weekly downloads
 
Created
Source

NgxQueueBar

Stack snackbars on top of one another. Display multiple snackbars at once.

This library is basically a copy of MatSnackBar, with some key methods changed. Because of this you can use it using the API identical to MatSnackBar one.

Demo

Try out the Demo

Usage

Install the package:

npm install ngx-queue-bar --save

Import QueueBarModule:

import { QueueBarModule } from 'ngx-queue-bar';

@NgModule({
    declarations: [AppComponent],
    imports: [
        ...
        QueueBarModule
    ],
    providers: [],
    bootstrap: [AppComponent]
})
export class AppModule { }

Queue a snackbar:

constructor(private _queueBar: QueueBarService) {}

open(message: string, action: string) {
    this._queueBar.open(message, action, {
        duration: 2000,
    });
}

Note

You should really only use MatSnackBar because Material specification discourages stacking snackbars or displaying them consecutively side by side.

Keywords

angular

FAQs

Package last updated on 17 Sep 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