mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-18 19:21:34 +08:00
feat(range): hookup the ion-range with a custom value accessor
This commit is contained in:
@ -43,8 +43,8 @@
|
||||
</ion-item>
|
||||
</ion-col>
|
||||
<ion-col>
|
||||
Value:
|
||||
<span id="searchOutput">{{searchValue}}</span>
|
||||
Value:
|
||||
<span id="searchOutput">{{searchValue}}</span>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
|
||||
@ -189,22 +189,27 @@
|
||||
|
||||
<ion-row>
|
||||
<ion-col>
|
||||
<h2>Segment</h2>
|
||||
<h2>Range</h2>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
<ion-row>
|
||||
<ion-col>
|
||||
<ion-segment [(ngModel)]="segmentValue" >
|
||||
<ion-segment-button value="taco"></ion-segment-button>
|
||||
<ion-segment-button value="burrito"></ion-segment-button>
|
||||
<ion-segment-button value="enchilada"></ion-segment-button>
|
||||
</ion-segment>
|
||||
<label for="stdRangeInput">Range Value</label>
|
||||
<input id="stdRangeInput" type="number" [(ngModel)]="rangeValue"/>
|
||||
</ion-col>
|
||||
<ion-col>
|
||||
Value:
|
||||
<span >{{segmentValue}}</span>
|
||||
<span>{{rangeValue}}</span>
|
||||
<span>{{typeOf(rangeValue)}}</span>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
|
||||
<ion-row>
|
||||
<ion-col>
|
||||
<ion-range id="ionRangeInput" [(ngModel)]="rangeValue"></ion-range>
|
||||
</ion-col>
|
||||
<ion-col></ion-col>
|
||||
</ion-row>
|
||||
</ion-grid>
|
||||
|
||||
<a href='home'>Home</a>
|
||||
|
@ -15,6 +15,10 @@ export class BasicInputsPageComponent implements OnInit {
|
||||
checkboxValue = true;
|
||||
toggleValue = false;
|
||||
|
||||
rangeValue = 15;
|
||||
|
||||
searchValue: string;
|
||||
|
||||
constructor() {}
|
||||
|
||||
ngOnInit() {}
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Component } from '@angular/core';
|
||||
import { PopoverController } from '@ionic/angular';
|
||||
// import { PopoverController } from '@ionic/angular';
|
||||
|
||||
@Component({
|
||||
selector: 'page-one',
|
||||
@ -14,8 +14,7 @@ export class PopoverPageToPresent {
|
||||
|
||||
ngOnInitDetection = 'initial';
|
||||
|
||||
constructor(private controller: PopoverController) {
|
||||
}
|
||||
// constructor(private controller: PopoverController) { }
|
||||
|
||||
|
||||
ngOnInit() {
|
||||
|
Reference in New Issue
Block a user