https://github.com/maddeveloper/ng4-input-counter
https://github.com/maddeveloper/ng4-input-counter
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/maddeveloper/ng4-input-counter
- Owner: MadDeveloper
- License: mit
- Created: 2017-06-16T09:32:13.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2017-07-06T10:13:01.000Z (about 8 years ago)
- Last Synced: 2025-02-24T21:06:53.417Z (4 months ago)
- Language: JavaScript
- Size: 29.3 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.MD
- License: LICENSE
Awesome Lists containing this project
README
# ng4-input-counter
A very cool input which display characters counter and can be configured to display counter bounds.
## Normal

## Maxlength

## Minlength

## Both

## Installation
To install the library, run:
```bash
$ npm install ng4-input-counter --save
```and then from your Angular module
```typescript
import { InputCounterModule } from 'ng4-input-counter';@NgModule({
...
imports: [
...
InputCounterModule.forRoot()
],
...
})
export class AppModule { }
```## How to use
```xml
```
### With Bootstrap
```xml
```## API of input-counter
**`ngModel: any`**
**`id: string`**
**`type: string = 'text'`**
**`className: string`**
> `className` (like the React way) has been used instead of `class` because of it being a reserved keyword in JavaScript and TypeScript.
**`name: string`**
**`placeholder: string = ''`**
**`maxlength: number`**
**`minlength: number`**
**`pattern: string`**
**`disabled: boolean = false`**
**`required: boolean = false`**
**`readonly: boolean = false`**
You can also bind all angular input events handler, like `(focus)`, `(blur)`, `(keyup)`, `(keydown)`, etc.
## License
MIT © [maddeveloper](https://github.com/MadDeveloper)