Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Modern number input component built with angular and material design

License

NotificationsYou must be signed in to change notification settings

angular-material-extensions/input-counter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

58 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

angular-material-extensions's logo

@angular-material-extensions/input-counter - Autocomplete input component for google-maps built with angular material design

npm versionnpm demoJoin the chat at https://gitter.im/angular-material-extensions/LobbyCoverage StatusBuild StatusCircleCI branchGreenkeeper BadgelicenseAwesome

@angular-material-extensions/input-counter

Built by and for developers ❤️

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 📢

Table of Contents

View all the directives and components in action athttps://angular-material-extensions.github.io/input-counter

1. Install vianpm.

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

SystemJS

Note:If you are usingSystemJS, 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

<mat-input-counter[min]="1"[max]="10"[step]="0.5"[label]="Your label"placeholder="your place holder"></mat-input-counter>

With Reactive forms

<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()});

@angular-material-extensions/input-counter

@angular-material-extensions/input-counter

API - for more info please visit the official documentationMaps JavaScript API

matGoogleMapsAutocomplete

optionbindtypedefaultdescription
valueInput()number ;-the value of the component (number)
minInput()number ;-The minimum value that the counter can have.
maxInput()number;-The maximum value that the counter can have.
stepInput()number-The values at which the thumb will snap.
labelInput()string-Label of the form field
placeholderInput()string-Placeholder of the form field
changeOutput()number-event when the input form value changed

Please checkout the full documentationhere

  1. clone thisrepo
  2. Install the dependencies by runningnpm i
  3. go to lib directory underprojects/angular-material-extensions/input-counter
  4. build the librarynpm run build

Built by and for developers ❤️ we will help you 👊

License

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

Stars

Watchers

Forks

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp