npm.io
1.1.3 • Published 6 years ago

ngx-bad-phone-spinner

Licence
Version
1.1.3
Deps
1
Size
280 kB
Vulns
0
Weekly
0
DeprecatedThis package is deprecated

ngx-bad-phone-spinner

npm npm npm

Index

About

This is a bad phone number picker for Angular 2+.

Setup

To install this library (component), run:

$ npm i ngx-bad-phone-spinner --save

Documentation

Add NumberPickerModule to AppModule

import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';

import { AppComponent } from './app.component';

// Import this library
import { NgxBadPhoneSpinnerModule } from 'ngx-bad-phone-spinner';

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,
    
    // Specify this library as an import
    NgxBadPhoneSpinnerModule,
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }

Once this library is imported, you can use this component in your Angular application:

Standalone Examples
export class AppComponent {
    change(value: number): void {
        console.log(value);
    }
}
<ngx-bad-phone-spinner
    [number]="mobile"
    (change)="change($event)">
</ngx-bad-phone-spinner>

Component Inputs and Outputs
Attribute Type Required Default Description
number [input] string No 0000000000 initial value for the spinner
(change) (output) number no - emits the value of the current number, every time the user clicks the - or + button

Issues

If you find any issues feel free to open a request in the Issues tab. If I have the time I will try to solve any issues but cannot make any guarantees. Feel free to contribute yourself.

Demo

Run npm install to get packages required for the demo and then run ionic serve to run locally.

Thanks