diff --git a/src/demo-app/chips/chips-demo.ts b/src/demo-app/chips/chips-demo.ts index 90593475db14..07e007d5509f 100644 --- a/src/demo-app/chips/chips-demo.ts +++ b/src/demo-app/chips/chips-demo.ts @@ -1,4 +1,4 @@ -import {Component, ElementRef} from '@angular/core'; +import {Component} from '@angular/core'; export interface Person { name: string; @@ -39,10 +39,10 @@ export class ChipsDemo { alert(message); } - add(input: ElementRef): void { - if (input.nativeElement.value && input.nativeElement.value.trim() != '') { - this.people.push({ name: input.nativeElement.value.trim() }); - input.nativeElement.value = ''; + add(input: HTMLInputElement): void { + if (input.value && input.value.trim() != '') { + this.people.push({ name: input.value.trim() }); + input.value = ''; } }