Issue
I am ionic 4 framework, in that i used ion-chip, i want to this ion-chip clickable. for example when i click on ion-chip navigate to another page.Here is the ion-chip documentation
Solution
You can add routerLink any element to navigate to another page.
<ion-chip routerLink="/home">
<ion-label>Home</ion-label>
</ion-chip>
<ion-chip>
<ion-label routerLink="/details/42" color="secondary"> Details </ion-label>
</ion-chip>
Or you in component (html) :
<ion-chip (ionClick)="openPage()">
<ion-label>Home</ion-label>
</ion-chip>
component :
openPage(){
this.router.navigateByUrl('/home');
}
Answered By - Khurshid Ansari
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.