From f291dcb98bd50b8e03a5c394b828bd8e1b9fcb50 Mon Sep 17 00:00:00 2001 From: Brian Nenninger Date: Fri, 3 Mar 2017 23:03:32 -0500 Subject: [PATCH] fix(chips): Fix adding new chips on demo page --- src/demo-app/chips/chips-demo.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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 = ''; } }