Enyojs add a loader effect for ajax call until successful response

108 Views Asked by At

I m new in enyojs. I have succesfully made an ajax call for listing data. What i need now is loader effect until data is loaded from ajax call. Any help is appreciated. Thanks in advance.

1

There are 1 best solutions below

0
Webby Vanderhack On

You can easily do something like use a Popup with a Spinner in it. You can set a flag on your app/view when you begin the fetch:

this.app.set('fetchingData', true);

and set it to false in the callback. Then have the Popup show while fetching. you can set this up with a binding if you like:

bindings: [
    {from: 'app.fetchingData', to: '$.popup.showing'}
]