sandal-promise
Sandal-promise extends the sandal dependency injection framework. It enables resolving using q promises..
Installation
Npm
$ npm install sandal-promise
Bower
$ bower install sandal-promise
Usage
Sandal-promise will extend the container with a .promise(names)
function. The promise function will take one or multiple strings as parameters and return a q promise. After resolving all components, the promise will be resolved with an array of components in the specified order. If only one name is provided the result will not be an array but the single resolved component.
For use in browsers the sandal and q libraries must be included before the promise extension.
Example (browser)
Example (Node.js)
var Sandal = ;var sandal = ; // or var Sandal = ;var sandal = ;sandal; // then sandalobject'myObject' myObjectobject'otherObject' otherObject;sandal ;