Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to handle http post request with ngx-typeahead? #52

Open
fahadsubzwari924 opened this issue May 3, 2021 · 2 comments
Open

How to handle http post request with ngx-typeahead? #52

fahadsubzwari924 opened this issue May 3, 2021 · 2 comments

Comments

@fahadsubzwari924
Copy link

All demos and examples of ngx-typahead are just using the same google search example or static json which is not usefull for most of the case.

I am implementing the same example of documentation like this
component.html

<div class="search-results">
  <input
    [value]="search"
    ngxTypeahead
    [taUrl]="url"
    [taParams]="params"
    (taSelected)="handleResultSelected($event)"
  />
</div>`

component.ts

public url = "http://suggestqueries.google.com/complete/search";
  public params = {
   hl: "en",
   ds: "yt",
   xhr: "t",
   client: "youtube",
   q: query,
};

So can anyone make me understand that how this is working? how typed text term is passing to the api and how results showing in the template. And i have to call http post with a body so how can i do that? any example any guide?

@orizens
Copy link
Owner

orizens commented May 3, 2021

@fahadsubzwari924
Copy link
Author

fahadsubzwari924 commented May 3, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants