mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-18 19:21:34 +08:00
feat(numeric-input): create number input control value accessor
This commit is contained in:
@ -30,6 +30,30 @@
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
|
||||
<ion-row>
|
||||
<ion-col>
|
||||
<h2>Numeric Input</h2>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
<ion-row>
|
||||
<ion-col>
|
||||
<ion-item>
|
||||
<ion-label>Ionic Numeric Input</ion-label>
|
||||
<ion-input type="number" id="ionNumberInput" name="ionNumberInput" [(ngModel)]="numberValue"></ion-input>
|
||||
</ion-item>
|
||||
</ion-col>
|
||||
<ion-col>
|
||||
<div>
|
||||
Value:
|
||||
<span id="numberOutput">{{numberValue}}</span>
|
||||
</div>
|
||||
<div>
|
||||
Type:
|
||||
<span id="numberOutputType">{{typeOf(numberValue)}}</span>
|
||||
</div>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
|
||||
<ion-row>
|
||||
<ion-col>
|
||||
<h2>Textarea Input</h2>
|
||||
@ -127,7 +151,8 @@
|
||||
<ion-col>
|
||||
<ion-item>
|
||||
<ion-label>Ionic Date</ion-label>
|
||||
<ion-datetime id="ionDatetimeInput" pickerFormat="YYYY-MM-DD HH:mm:ss" displayFormat="MM/DD/YYYY HH:mm:ss" name="ionDatetimeInput" [(ngModel)]="datetimeValue"></ion-datetime>
|
||||
<ion-datetime id="ionDatetimeInput" pickerFormat="YYYY-MM-DD HH:mm:ss" displayFormat="MM/DD/YYYY HH:mm:ss" name="ionDatetimeInput"
|
||||
[(ngModel)]="datetimeValue"></ion-datetime>
|
||||
</ion-item>
|
||||
</ion-col>
|
||||
<ion-col>
|
||||
|
@ -10,6 +10,7 @@ export class BasicInputsPageComponent implements OnInit {
|
||||
datetimeValue = '2017-11-18T14:17:45-06:00';
|
||||
textareaValue = 'This is the Textarea Input';
|
||||
textValue = 'This is the Text Input';
|
||||
numberValue = 1138;
|
||||
|
||||
checkboxValue = true;
|
||||
toggleValue = false;
|
||||
@ -17,4 +18,8 @@ export class BasicInputsPageComponent implements OnInit {
|
||||
constructor() {}
|
||||
|
||||
ngOnInit() {}
|
||||
|
||||
typeOf(v: any): string {
|
||||
return typeof v;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user