mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-21 04:53:58 +08:00
feat(demo): add textarea to the demo page
This commit is contained in:
@ -31,6 +31,18 @@
|
|||||||
<span id="ionTextInputOutput">{{ionTextInput}}</span>
|
<span id="ionTextInputOutput">{{ionTextInput}}</span>
|
||||||
</ion-col>
|
</ion-col>
|
||||||
</ion-row>
|
</ion-row>
|
||||||
|
<ion-row>
|
||||||
|
<ion-col>
|
||||||
|
<ion-item>
|
||||||
|
<ion-label>Ionic Text Area Input</ion-label>
|
||||||
|
<ion-textarea id="ionTextareaInput" name="ionTextareaInput" [(ngModel)]="ionTextareaInput"></ion-textarea>
|
||||||
|
</ion-item>
|
||||||
|
</ion-col>
|
||||||
|
<ion-col>
|
||||||
|
Ionic Text Input:
|
||||||
|
<span id="ionTextInputOutput">{{ionTextareaInput}}</span>
|
||||||
|
</ion-col>
|
||||||
|
</ion-row>
|
||||||
|
|
||||||
<ion-row>
|
<ion-row>
|
||||||
<ion-col>
|
<ion-col>
|
||||||
|
@ -7,6 +7,7 @@ import { Component, OnInit, ViewEncapsulation } from '@angular/core';
|
|||||||
encapsulation: ViewEncapsulation.None
|
encapsulation: ViewEncapsulation.None
|
||||||
})
|
})
|
||||||
export class InputsTestPageComponent implements OnInit {
|
export class InputsTestPageComponent implements OnInit {
|
||||||
|
ionTextareaInput = 'This is the Ionic Textarea Input';
|
||||||
ionTextInput = 'This is the Ionic Text Input';
|
ionTextInput = 'This is the Ionic Text Input';
|
||||||
stdTextInput = 'This is the HTML Text Input';
|
stdTextInput = 'This is the HTML Text Input';
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@ import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';
|
|||||||
// May also need to look at this to see if we need anything else:
|
// May also need to look at this to see if we need anything else:
|
||||||
// https://github.com/angular/angular/blob/5.0.1/packages/forms/src/directives/default_value_accessor.ts#L33-L101
|
// https://github.com/angular/angular/blob/5.0.1/packages/forms/src/directives/default_value_accessor.ts#L33-L101
|
||||||
@Directive({
|
@Directive({
|
||||||
selector: 'ion-input',
|
selector: 'ion-input,ion-textarea',
|
||||||
providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: IonTextValueAccessorDirective, multi: true }]
|
providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: IonTextValueAccessorDirective, multi: true }]
|
||||||
})
|
})
|
||||||
export class IonTextValueAccessorDirective implements ControlValueAccessor {
|
export class IonTextValueAccessorDirective implements ControlValueAccessor {
|
||||||
|
Reference in New Issue
Block a user