orizens / ngx-typeahead

A simple but yet powerful typeahead component for Angular (css framework agnostic)
https://www.npmjs.com/package/ngx-typeahead
MIT License
61 stars 29 forks source link

Headers in http request #44

Open aonnen opened 4 years ago

aonnen commented 4 years ago

Hi all,

It would be great to add headers in the http request i need to add Authorization field

https://github.com/orizens/ngx-typeahead/blob/master/src/modules/ngx-typeahead.component.ts line 260

  request(query: string) {
    const url = this.taUrl;
    const searchConfig = createParamsForQuery(
      query,
      this.taQueryParam,
      this.taParams
    );
    const options = {
      params: searchConfig
      **headers: this.taHeaders**
    };

Antoine