@muriel.schmidt
In Ember.js, you can add parameters to a submit action by using the sendAction
method in your template and passing the parameter as an argument.
For example, in your template, you can define a submit action with a parameter like this:
1
|
<button {{action 'submitAction' 'parameterValue'}}>Submit</button> |
In this example, the 'parameterValue'
is passed as an argument to the submitAction
action.
Then, in your component or controller, you can handle the action and access the passed parameter like this:
1 2 3 4 5 6 |
actions: { submitAction(parameter) { // handle the submit action with the passed parameter console.log(parameter); } } |
This way, you can add parameters to your submit action in Ember.js.