Product
Socket Now Supports uv.lock Files
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
angular-q-spread
Advanced tools
Add spread
method to the promise returned by $q.all.
spread
can be used as a replacement for then
. Similarly, it takes two parameters, a callback when all promises are resolved and a callback for failure.
The resolve callback is going to be called with the result of the list of promises passed to $q.all as separate parameters instead of one parameters which is an array.
#Compatibility This plugin has been tested with Angular 1.2 and 1.3
#Usage
Add $q-spread
as dependency when creating your angular module.
#Example angular.module('test', ['$q-spread']);
function TestCtrl($scope, $q, MyService) {
$scope.data1 = null;
$scope.data2 = null;
function dataSuccess(result1, result2)
{
$scope.data1 = result1;
$scope.data2 = result2;
}
function dataFailure(reason)
{
alert('Could not load data: ' + reason);
}
$q
.all([
MyService.getData1(),
MyService.getData2()
])
.spread(dataSuccess, dataFailure);
};
TestCtrl.$inject = ['$scope', '$q', 'MyService'];
angular.module('test').controller('TestCtrl', TestCtrl);
This Angular module has been published under the MIT license
1.0.1
FAQs
Add `spread` method to the promise of $q.all
The npm package angular-q-spread receives a total of 25 weekly downloads. As such, angular-q-spread popularity was classified as not popular.
We found that angular-q-spread 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.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.
Security News
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.