@lucasheight/angular-controls
TypeScript icon, indicating that this package has built-in type declarations

0.0.27 • Public • Published

npm version

Angular-controls

Number Input Component

A number input component. Features

  • Provides a 'factor' attribute to allow a display multiplication without change to model value. This is useful when you want to display a decimal value as a percentage (i.e. 01 * 100).
  • Prefix and postfix inputs to allow display of additional strings.
  • Supports template and reactive forms.
  • Attributes for title, placeholder, disabled and decimals.

Installation

Install the library from npm:

npm install --save @lucasheight/angular-controls

Using component

Import the module into your angular application module.

import {LhControlsModule} from "@lucasheight/angular-controls"
@NgModule({
    imports:[
      LhControlsModule
    ]
})
export class AppModule{}

Add the control in you template:

<lh-numberInput factor="1" decimals="2" title="Hello numbers" placeholder="Please enter" prefix="$" postfix=" AUD" (valueChange)="onChange($event)" (focus)="onFocus($event)"
    (blur)="onBlur($event)" width="100" [(value)]="val"></lh-numberInput>

Package Sidebar

Install

npm i @lucasheight/angular-controls

Weekly Downloads

0

Version

0.0.27

License

MIT

Unpacked Size

93.3 kB

Total Files

17

Last publish

Collaborators

  • lucasheight