Skip to content

Commit 15106aa

Browse files
committed
not extend from MdInput
1 parent fc5f6e9 commit 15106aa

File tree

1 file changed

+3
-13
lines changed

1 file changed

+3
-13
lines changed

src/lib/chips/chip-input.ts

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,7 @@ import {
1212
Output,
1313
EventEmitter,
1414
Input,
15-
Optional,
16-
Renderer2,
17-
Self,
1815
} from '@angular/core';
19-
import {FormGroupDirective, NgControl, NgForm} from '@angular/forms';
20-
import {Platform} from '@angular/cdk/platform';
2116
import {coerceBooleanProperty} from '@angular/cdk/coercion';
2217
import {ENTER} from '@angular/material/core';
2318
import {MdChipList} from './chip-list';
@@ -87,19 +82,14 @@ export class MdChipInput {
8782
@Input() placeholder: string = '';
8883

8984
get empty(): boolean {
90-
let value: string | null = this._elementRef.nativeElement.value;
85+
let value: string | null = this._inputElement.value;
9186
return value == null || value === '';
9287
}
9388

9489
/** The native input element to which this directive is attached. */
9590
protected _inputElement: HTMLInputElement;
9691

97-
constructor(protected _elementRef: ElementRef,
98-
protected _renderer: Renderer2,
99-
protected _platform: Platform,
100-
@Optional() @Self() public ngControl: NgControl,
101-
@Optional() protected _parentForm: NgForm,
102-
@Optional() protected _parentFormGroup: FormGroupDirective) {
92+
constructor(protected _elementRef: ElementRef) {
10393
this._inputElement = this._elementRef.nativeElement as HTMLInputElement;
10494
}
10595

@@ -140,5 +130,5 @@ export class MdChipInput {
140130
}
141131
}
142132

143-
focus() { this._elementRef.nativeElement.focus(); }
133+
focus() { this._inputElement.focus(); }
144134
}

0 commit comments

Comments
 (0)