angular/di.js — pull request #45 by vojtajina (2014-05-09 11:34:32+00:00)
Title: feat: inject non-annotated tokens as values

If a token is an object or a non-annotated function/class and there is no other provider defined for this token, the default provider returns the value instead of calling it.

This is helpful for injecting third-party code (without instantiating it) that is not annotated. Eg. Node's native modules:
```js
var fs = require('fs');

@Inject(fs.readFile)
class Foo {
constuctor(readFile) {}
}
```

Fixes #30

BREAKING CHANGE:
This means that every function/class (that should be called/instantiated) has to be annotated with `@Inject`, even if it takes no arguments.

----------------
See how templating and expressionist needs to be refactored:
https://github.com/angular/templating/pull/35
https://github.com/angular/expressionist.js/pull/13