Published on 12/22/2020
Published by Pratik Takle
SPA Ajax
Use SPA ajax rather than jquery ajax in Awesome, and perform your script operation within module without returning the value.
1 2 3 4 5 6 7 8 9 |
<script type="spa/axn" axn="core.run_script"> spa.route.run({ route_ajax: {specify your route here}, block:{ params:{ <specify parameter which are need to be send over ajax>} } }); </script> |
Example:
1 2 3 4 5 6 7 8 9 10 11 12 |
<script type="spa/axn" axn="core.run_script"> spa.route.run({ route_ajax: home.set_data, block:{ params:{ rule_id: rule_id, class_id:class_id, school_id: school_id, } } }); </script> |
This will execute set data template from home module.