Ways to achieve similar funtionalities of block-ui JS library in nativescript


#1

Hey All!

I am looking for an similar funtionalities/behaviour of block-ui JS library for Nativescript Angular.

Please suggest the possible/crack ways!

Cheers!


#2

@kumaran We have ProgressDialog in Android which exactly serves the purpose.

In iOS you can simply add an ActivityIndicator and block user interaction using code below.

utils.ios.getter(UIApplication, UIApplication.sharedApplication).beginIgnoringInteractionEvents();

Until you end ignoring events the app will not respond to any user actions.

utils.ios.getter(UIApplication, UIApplication.sharedApplication).endIgnoringInteractionEvents();

In my angular applications I do this in interceptor so while API calls the indicator will appear by default and no user interaction will be allowed, upon completion or error I just remove indicator and end ignore events.