We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f02af52 commit 2d16a24Copy full SHA for 2d16a24
src/demo-app/chips/chips-demo.ts
@@ -1,4 +1,4 @@
1
-import {Component, ElementRef} from '@angular/core';
+import {Component} from '@angular/core';
2
3
export interface Person {
4
name: string;
@@ -39,10 +39,10 @@ export class ChipsDemo {
39
alert(message);
40
}
41
42
- add(input: ElementRef): void {
43
- if (input.nativeElement.value && input.nativeElement.value.trim() != '') {
44
- this.people.push({ name: input.nativeElement.value.trim() });
45
- input.nativeElement.value = '';
+ add(input: HTMLInputElement): void {
+ if (input.value && input.value.trim() != '') {
+ this.people.push({ name: input.value.trim() });
+ input.value = '';
46
47
48
0 commit comments