@@ -12,12 +12,7 @@ import {
12
12
Output ,
13
13
EventEmitter ,
14
14
Input ,
15
- Optional ,
16
- Renderer2 ,
17
- Self ,
18
15
} from '@angular/core' ;
19
- import { FormGroupDirective , NgControl , NgForm } from '@angular/forms' ;
20
- import { Platform } from '@angular/cdk/platform' ;
21
16
import { coerceBooleanProperty } from '@angular/cdk/coercion' ;
22
17
import { ENTER } from '@angular/material/core' ;
23
18
import { MdChipList } from './chip-list' ;
@@ -87,19 +82,14 @@ export class MdChipInput {
87
82
@Input ( ) placeholder : string = '' ;
88
83
89
84
get empty ( ) : boolean {
90
- let value : string | null = this . _elementRef . nativeElement . value ;
85
+ let value : string | null = this . _inputElement . value ;
91
86
return value == null || value === '' ;
92
87
}
93
88
94
89
/** The native input element to which this directive is attached. */
95
90
protected _inputElement : HTMLInputElement ;
96
91
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 ) {
103
93
this . _inputElement = this . _elementRef . nativeElement as HTMLInputElement ;
104
94
}
105
95
@@ -140,5 +130,5 @@ export class MdChipInput {
140
130
}
141
131
}
142
132
143
- focus ( ) { this . _elementRef . nativeElement . focus ( ) ; }
133
+ focus ( ) { this . _inputElement . focus ( ) ; }
144
134
}
0 commit comments