Ember addon for UI blocking combined with a spinner.
Implemented with block-ui & spin.js
Installation
npm install ember-ui-blocker --save-dev
ember g ember-ui-blocker
Usage
// app/some-route/route.jsRoute;
Configuration
- Environment configuration (deep merge)
Deep-merge custom options with the default options by adding the following toconfig/environment.js
'ember-ui-blocker': /* The default options are: disableSpinner: false, spinnerSelector: 'body', blockDelay: 200, // minimum blocking delay for the method 'executeWhileBlocking' blockUIOptions: { ... }, spinjsOptions: { .. } */
block-ui options reference
spin.js options reference
- Change default options in runtime (deep merge)
// app/services/some-service.jsService;
- Method invocation (deep merge)
Pass options to every method as a last argument.
These options will be deep-merged with the default options & the above custom options.
// app/some-route/route.jsRoute;
License
MIT