Published on 12/22/2020
Published by Pratik Takle
Button with axn='route.run'
If you want to fire ajax on click without form submit.
Syntax:
1 2 3 4 5 6 7 8 9 |
<button bind="click" axn='route.run' bind_selector='{class, name or Id of action selector}' route_ajax='{route where action need to perform}' class="{button classes}" {other args} > </button> |
Example:
1 2 3 4 5 6 7 8 |
<button bind="click" axn='route.run' bind_selector='.edit_submit' route_ajax='[module.slug /].key-skill-edit' class="btn btn-success key-skill-edit-button" term-id="[aw2.get @skill.item.term_id /]"> </button> |