I\'m working with the Lookup component and am getting an error that my data object is undefined and thus cannot .filter(). Code is below:
getAllAccounts() {
Just a small comment regarding this ;-)
It's perhaps better to wrap your lookup method instead of using the bind
method in TypeScript because you will lose type checking.
Something like this:
this.lookup = (query) => {
this.lookup(query);
};
See this link for more details:
Answered by @bekos on the Gitter. Need to add binding to component constructor:
constructor(elementRef:ElementRef, private _quickAddService:QuickAddService) {
this.visible = true;
this.lookup = this.lookup.bind(this);
}