swalert 2 show loader 1

swalert 2 show loader

                title: 'Please Wait !',
                html: 'data uploading',// add html attribute if you want or remove
                allowOutsideClick: false,
                onBeforeOpen: () => {

Here is what the above code is Doing:
1. First, we are importing the Swal library.
2. Then, we are creating a function called showLoadingSwal() which will show the loading screen.
3. Inside the function, we are using the Swal.fire() method to show the loading screen.
4. The Swal.fire() method takes an object as an argument.
5. Inside the object, we are passing the title, html, and allowOutsideClick properties.
6. The title property is used to set the title of the loading screen.
7. The html property is used to set the text of the loading screen.
8. The allowOutsideClick property is used to disable the outside click.
9. The onBeforeOpen property is used to show the loading screen before opening the screen.
10. The Swal.showLoading() method is used to show the loading screen.

Similar Posts