Input helper with action, not work

that’s my code:

{{input type="submit" value=submit_btn_value  class="button button-blue me_btn_top pay_recharge" action='charge' }}

the above charge action not trigger when click, but if I append on="key-up" to the input helper, It works, but click twice.

Ember 1.13

I think your template is incorrect, it should be:

{{input type="submit" value=submit_btn_value click='charge' }}

(class left out for readability)

As a sidenote, instead of registering an action on the submit button itself, you might want to register an action on the submit event of the form itself.

<form {{action 'charge' on='submit'}}>
1 Like