javascript - clear sorting button of ngtable is calling form submit -
i using ng-table inside form.
<form role="form" name="frmcommand" class="formvalidcommand" novalidate="novalidate" ng-submit="frmcommand.$valid && vm.savecommandchanges()">
i have clear sorting button on table.
<button ng-click="storecommandstableparams.sorting({})" class="btn btn-default pull-right">clear sorting</button>
clicking button calling vm.savecommandchanges() instead of clearing sort.
any suggestions please?
default type attribute value button
tag submit
, when click on it trigger parent form's submit event captured ng-submit
directive. try change button
type submit event not happen.
ie.
<button type="button" ng-click="storecommandstableparams.sorting({})" class="btn btn-default pull-right">clear sorting</button>
Comments
Post a Comment