0.1.2 • Published 4 years ago

ng2-api-count v0.1.2

Weekly downloads
27
License
MIT
Repository
github
Last release
4 years ago

Ng2ApiCounter

You can use the Loader Service to get count of all ongoing api with this simple add on package.

Quick start

  1. Add ng2-api-count to your package.json or install with npm i ng2-api-count --save.
  2. Import the ApiCountModule into your app.module.ts file. Here's a TypeScript example:
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';

import { AppComponent } from './app.component';
import { ApiCountModule } from 'ng2-api-count';
import { HttpClientModule } from '@angular/common/http';

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,
    ApiCountModule,
    HttpClientModule
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }
  1. Use the LoaderService and apiCount variable in your component code. The following example displays the supported attributes:
import { Component, OnInit } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { LoaderService } from 'ng2-api-count';

@Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.css']
})
export class AppComponent implements OnInit {
  constructor(private httpClient: HttpClient, private _loaderService: LoaderService) {
  }

  get apiCount() {
    return this._loaderService.apiCount;
  }
}

Feel free to ask any doubts if you have any or raise PR if you want to make changes

0.1.2

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago

0.0.9

4 years ago

0.0.8

4 years ago

0.0.7

4 years ago

0.0.5

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago