Button with axn='route.run'

/ SPA Samples / Button with axn='route.run'

If you want to fire ajax on click without form submit.

Syntax:

<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}"
>
</button>

Example:

<button 
	bind="click"
	axn='route.run'
	bind_selector='.edit_submit'
	route_ajax='[module.slug /].[template_name='key-skill-edit']'
	class="btn btn-success key-skill-edit-button"
	term-id="[aw2.get @skill.item.term_id /]">
</button>

 

Categories
Most Popular

Leave a Reply

Your email address will not be published. Required fields are marked *