import {Component, Optional, ElementRef, ViewChild} from 'angular2/core'; import {NgIf, NgControl} from 'angular2/common'; import {Button} from '../button/button'; import {Config} from '../../config/config'; import {Content} from '../content/content'; import {Form} from '../../util/form'; import {InputBase} from './input-base'; import {IonicApp} from '../app/app'; import {Item} from '../item/item'; import {Label} from '../label/label'; import {NativeInput, NextInput} from './native-input'; import {NavController} from '../nav/nav-controller'; import {Platform} from '../../platform/platform'; /** * @name Input * @description * * `ion-input` is meant for text type inputs only, such as `text`, * `password`, `email`, `number`, `search`, `tel`, and `url`. Ionic * still uses an actual `` HTML element within the * component, however, with Ionic wrapping the native HTML input * element it's able to better handle the user experience and * interactivity. * * Similarily, `` should be used in place of `' + '' + '
', directives: [ NgIf, NextInput, NativeInput ] }) export class TextArea extends InputBase { constructor( config: Config, form: Form, @Optional() item: Item, app: IonicApp, platform: Platform, elementRef: ElementRef, @Optional() scrollView: Content, @Optional() nav: NavController, @Optional() ngControl: NgControl ) { super(config, form, item, app, platform, elementRef, scrollView, nav, ngControl); } /** * @private */ ngOnInit() { super.ngOnInit(); if (this._item) { this._item.setCssClass('item-textarea', true); } } /** * @private */ inputBlurred(event) { this.blur.emit(event); } /** * @private */ inputFocused(event) { this.focus.emit(event); } }