Quantcast
Channel: Ionic Forum - Latest posts
Viewing all articles
Browse latest Browse all 230057

Pass data using keyup.enter

$
0
0

i made a search bar in main.html like this.

<ion-searchbar #q [(ngModel)]="searchQuery" (keyup.enter)="gameName(q.value)"></ion-searchbar>

and this is my main.ts

gameName( q: string ) {
    //console.log(q); 
    this.router.navigateByUrl('/menu/search');
  }

when i push the enter button, the new page(/menu/search) is open now.
but!
i want to go to the new page with data ‘q’!!
how can i send the data with using this ‘gameName()’ function?


Viewing all articles
Browse latest Browse all 230057

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>