Issue
I know that the name and value attributes cannot bind to a button,but what's the solution? I'm trying to do this:
<ion-button type="submit" color="primary" style="text-align:center" ngModel value="{{data.id}}" name="follower_id">
follow
</ion-button>
It's not a form it's just an ion-card that returns some data from the server, and now I have to pass one of these data by clicking on the button bcuz I have another server function that needs this data in particular, this data is the id and it's not a constant integer, each ion-card has a different ID HELP ME PLEAAASE :(
Solution
You can use (click)="follow(data.id)" inside button
And in ts file create follow function to handle button click event.
Answered By - Aarej
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.