i want to show loading text when click submit button and before the form submit. i tried this code.
<button type="button" @click="addCustomers"
:disabled="disableSubmitButton" class="btn btn-primary" style="float:
right;" value="ADD CUSTOMER">{{customer.loading ? "Loading..." : "ADD
CUSTOMER"}}</button>
after i add a loading object in data.
data(){
return {
loading: false,
}
}
when i call to my click event function i add "loading = true" to display my loading text.
but this process not working. how can i show it. i don't want any spinner loading packages in vuejs. this is my click event function.
addCustomers(){
customer.loading = true;
axios.post(){
....
}
}