angular2-input-counter
    TypeScript icon, indicating that this package has built-in type declarations

    0.1.7 • Public • Published

    angular2-input-counter

    This labrary adds two incremental buttons + and - for input to make like counter. eg. you can use this in shopping cart to show quantity

    Preview

    alt preview

    Installation

    To install this library, run:

    $ npm install angular2-input-counter --save

    Consuming library

    you can import your library in any Angular application by running:

    $ npm install angular2-input-counter

    and then from your Angular AppModule:

    import { BrowserModule } from '@angular/platform-browser';
    import { NgModule } from '@angular/core';
     
    import { AppComponent } from './app.component';
     
    // Import your library
    import { InputCounterComponent } from 'angular2-input-counter';
     
    @NgModule({
      declarations: [
        AppComponent,
     
        // Specify your library as a declaration
        InputCounterComponent
      ],
      imports: [
        BrowserModule,
     
        // Specify your library as an import
        
      ],
      providers: [],
      bootstrap: [AppComponent]
    })
    export class AppModule { }

    Once your library is imported, you can use its components, directives and pipes in your Angular application:

    <!-- You can now use your library component in app.component.html -->
    <h1>
      {{title}}
    </h1>
    <input-counter btnClass="customClass" inputClass="customClass"  (onCounterChange)="customEvent()"></input-counter>

    Development

    To generate all *.js, *.d.ts and *.metadata.json files:

    $ npm run build

    To lint all *.ts files:

    $ npm run lint

    License

    MIT © Sagar Devkota

    Install

    npm i angular2-input-counter

    DownloadsWeekly Downloads

    16

    Version

    0.1.7

    License

    MIT

    Last publish

    Collaborators

    • sagarda7