Lightweight platform agnostic DI library
npm install ae
npm install ae
`
For use in the browser, first ensure browserify is installed:
`
npm install -g browserify
`
then run the following command
`
npm run build-browser
`
to generate a browser compliant build (build/ae-web.js)
Getting Started
`javascript
var Ae = require('ae'),
app = Ae.App('myApp');
app.value('msgFormat', 'Hello, {0}')
.value('recipient', 'world')
.factory('greeter',
[
'msgFormat',
'recipient',
function(msgFormat, recipient)
{
return Ae.supplant(msgFormat, [ recipient ]);
}
]);
app.invoke([
'greeter',
function(greeting)
{
console.log(greeting); //> Hello, World
}
]);
``