Reputation: 1026
HTML
<input #autoC auto-complete [(ngModel)]="myData" [source]="mySource" />
TS
@ViewChild('autoC') auto: ElementRef;
But when i use ViewChild I have reference to input and auto-complete is attributes. Is possible get reference to auto-complete. I need this element because i want change some css style in auto-complete? Using [ngClass]
also add style to input element.
This is the autocomplete package
Upvotes: 0
Views: 39
Reputation: 599
Try using @ViewChild('autoC') auto: HTMLElement;
. You'll get access to attributes and their get and set methods as well. Check below screenshot.
Upvotes: 1