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?