/** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ import {Component} from '@angular/core'; @Component({ selector: 'input-app', template: `

Input App

Input val is {{inputVal}}.
Textarea val is {{textareaVal}}.
` }) export class InputCmp { inputVal = ''; textareaVal = ''; inputChanged(e: Event) { this.inputVal = (e.target as HTMLInputElement).value; } textAreaChanged(e: Event) { this.textareaVal = (e.target as HTMLTextAreaElement).value; } }