Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
angular-busy
Advanced tools
> Show busy/loading indicators on any element during $http requests (or any promise).
Show busy/loading indicators on any element during $http requests (or any promise).
This library depends on Andy Joslin's angular-promise-tracker.
Annotate an $http
request using angular-promise-tracker
and add cg-busy
on an element to display a busy
indication on a specific element during the $http
request.
This library builds on Angular 1.2 and the new Angular animate module in animate.js
.
Supports IE 10, and recent versions of FF and Chrome.
Add dist/angular-busy.js
and dist/angular-busy.css
to your index.html. Also add the angular-promise-tracker
files as necessary.
Add cgBusy
as a module dependency for your module (in addition to ajoslin.promise-tracker
and the Angular 1.2 ngAnimate
module):
angular.module('your_app', ['ngAnimate','ajoslin.promise-tracker','cgBusy']);
Add the promise trackers as you normally would using angular-promise-tracker
:
function MyCtrl($scope) {
$scope.pizzaFlavor = $http.get('/pizzaFlavor', { tracker: 'pizza' });
}
Add cg-busy
to the elements you wish to be busy during those requests:
<div cg-busy="'pizza'"></div>
The cg-busy
directive expects a value that is interpreted as an expression. The value may be specified as an object literal
or simply as a string if only the tracker
value is provided.
In other words. You may do this:
<div cg-busy="'my_tracker'"></div> <!-- Notice the extra single quotes because its an expression -->
or this:
<div cg-busy="{tracker:'my_tracker',backdrop:false,template:'myAwesomeTemplate.html'}"></div>
tracker
- Required. The name(s) of the promise tracker. May either be a string or an array of strings if you wish to use the same indicator for multiple promises/trackers.backdrop
- Optional. Boolean, default is true. If true a faded backdrop will be shown behind the progress indicator.template
- Optional. If provided, the given template will be shown in place of the default progress
indicatory template. Use this to override the default UI and provide your own.The default progress template shows a spinner and a 'Please Wait...' message. But you can define custom templates per instance
(as shown above) or change the global default template. To change the global default template just provide a new
$injector
value for cgBusyTemplateName
. Ex:
angular.module('yourapp').value('cgBusyTemplateName','your_custom_template_here.html');
Templates are full, normal Angular partials with access to the scope of where the cg-busy
was used.
FAQs
> Show busy/loading indicators on any $http or $resource request, or on any promise.
The npm package angular-busy receives a total of 0 weekly downloads. As such, angular-busy popularity was classified as not popular.
We found that angular-busy demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.