If a function is called this way @click="${hello}", how can I pass parameter into it?
The function works fine for me if it looks like this: function hello() {...} but won't work anymore if the function expects any parameter like function hello(parameter) {...}, because calling @click="${hello()} or @click=${hello(parameter}} result in some Unhandled Promise Rejection error.
What is the name of this style of calling function (@click="${hello}) and how do I properly pass parameter into it?
Aucun commentaire:
Enregistrer un commentaire