August 2017
Beginner
298 pages
7h 4m
English
The first step to start submitting is to hide the submit button and replace it with a loading indicator. This way, the user can't accidentally click Submit twice. Also, the loading indicator serves as an indication that a process is happening in the background. In the home.js file, inside the submitForm() method, add the following code:
submitForm(formValues) { this.$submit.classList.add('hidden'); this.$loadingIndicator.classList.remove('hidden');}
This will hide the submit button and display the loading indicator. To make apiCall, we need to import the apiCall function and notify the user that the request has been completed. I have added a package called toastr in the package.json file. It should have been installed already ...
Read now
Unlock full access