- Notifications
You must be signed in to change notification settings - Fork2
Modern number input component built with angular and material design
License
angular-material-extensions/input-counter
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
@angular-material-extensions/input-counter - Autocomplete input component for google-maps built with angular material design
Do you have any question or suggestion ? Please do not hesitate to contact us!Alternatively, provide a PR | open an appropriate issuehere
If did you like this project, supportangular-material-extensionsby starring ⭐ and sharing it 📢
View all the directives and components in action athttps://angular-material-extensions.github.io/input-counter
- Angular (requires Angular
Now install@angular-material-extensions/input-counter
via:
npm install --save @angular-material-extensions/input-counter
for the ui input component, please consider to install the following packages
npm i @angular/cdk @angular/material @angular/animations @angular/forms
Note:If you are using
SystemJS
, you should adjust your configuration to point to the UMD bundle.In your systemjs config file,map
needs to tell the System loader where to look for@angular-material-extensions/input-counter
:
{'@angular-material-extensions/input-counter';:'node_modules/@angular-material-extensions/input-counter/bundles/input-counter.umd.js',}
Once installed you need to import the main module:
import{MatInputCounterModule}from'@angular-material-extensions/input-counter';
The only remaining part is to list the imported module in your application module. The exact method will be slightlydifferent for the root (top-level) module for which you should end up with the code similar to (notice MatInputCounterModule.forRoot()
):
import{MatInputCounterModule}from'@angular-material-extensions/input-counter';@NgModule({declarations:[AppComponent, ...],imports:[MatInputCounterModule, ...],bootstrap:[AppComponent]})exportclassAppModule{}
Other modules in your application can simply importMatInputCounterModule
:
import{MatInputCounterModule}from'@angular-material-extensions/input-counter';@NgModule({declarations:[OtherComponent, ...],imports:[MatInputCounterModule, ...],})exportclassOtherModule{}
<mat-input-counter[min]="1"[max]="10"[step]="0.5"[label]="Your label"placeholder="your place holder"></mat-input-counter>
<form[formGroup]="formGroup"><mat-input-counterformControlName="inputCounter"[min]="+options.min"[max]="+options.max"[step]="+options.step"[label]="options.label"[placeholder]="options.placeholder"></mat-input-counter></form>
formGroup:FormGroup;this.formGroup=newFormGroup({inputCounter:newFormControl()});
API - for more info please visit the official documentationMaps JavaScript API
option | bind | type | default | description |
---|---|---|---|---|
value | Input() | number ; | - | the value of the component (number) |
min | Input() | number ; | - | The minimum value that the counter can have. |
max | Input() | number ; | - | The maximum value that the counter can have. |
step | Input() | number | - | The values at which the thumb will snap. |
label | Input() | string | - | Label of the form field |
placeholder | Input() | string | - | Placeholder of the form field |
change | Output() | number | - | event when the input form value changed |
Please checkout the full documentationhere
- clone thisrepo
- Install the dependencies by running
npm i
- go to lib directory under
projects/angular-material-extensions/input-counter
- build the library
npm run build
- ngx-auth-firebaseui
- ngx-linkifyjs
- @firebaseui/ng-bootstrap
- @angular-material-extensions/pages
- @angular-material-extensions/link-preview
- @angular-material-extensions/password-strength
- @angular-material-extensions/google-maps-autocomplete
- @angular-material-extensions/select-country
- @angular-material-extensions/fab-menu
- @angular-material-extensions/faq
- @angular-material-extensions/contacts
- Drop an email to:Anthony Nahas
- or open an appropriateissue
- let us chat onGitter
Built by and for developers ❤️ we will help you 👊
Copyright (c) 2020Anthony Nahas. Licensed under the MIT License (MIT)
About
Modern number input component built with angular and material design
Topics
Resources
License
Code of conduct
Contributing
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.