Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ngx-request-queue

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

ngx-request-queue

Angular 5+ Request Queue handler module

  • 2.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
8
increased by700%
Maintainers
1
Weekly downloads
 
Created
Source

Angular 5+ Request Queue Module

This package provides ability to track queues of requests, e.g. if you need to display activity indicator during the requests.

Package is given in completely 100% pure TypeScript.

npm install ngx-request-queue --save
npm install @decorators/common --save

Full example

Full example you can find in this repo serhiisol/ngx-request-queue-example

Usage

  1. Import QueueService interface to implement it with your custom queue service, e.g.:
import { Injectable } from '@angular/core';

@Injectable()
export class QueueService {

  constructor(private progressService: NgProgressService) { }

  /**
   * Handler for queue started event
   */
  public queueStarted(): void {
    this.progressService.start();
    
  }

  /**
   * Handler for queue finsihed event
   */
  public queueFinished(): void {
    this.progressService.done();
  }
}
  1. Provide QUEUE_SERVICE, QueueModule alongside with HttpClientModule, e.g.:
import { NgModule } from '@angular/core';
import { HttpClientModule } from '@angular/common/http';
import { QueueModule, QUEUE_SERVICE } from 'ngx-request-queue';

import { QueueService } from './queue.service';

@NgModule({
    imports: [ 
      HttpClientModule,
      QueueModule
     ],
    providers: [
      { provide: QUEUE_SERVICE, useClass: QueueService },
    ]
})
export class AppModule { }

Keywords

FAQs

Package last updated on 03 Apr 2018

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc