Fix documentation for toFactory and toAsyncFactory

The bound String classes should have a dependency on Number, not String.

Closes #1654
This commit is contained in:
Kevin Western 2015-05-03 16:14:32 -07:00 committed by Misko Hevery
parent 8ef183b593
commit 42f6baeaec
1 changed files with 2 additions and 2 deletions

View File

@ -401,7 +401,7 @@ export class BindingBuilder {
* ```javascript
* var injector = Injector.resolveAndCreate([
* bind(Number).toFactory(() => { return 1+2; }}),
* bind(String).toFactory((v) => { return "Value: " + v; }, [String] })
* bind(String).toFactory((v) => { return "Value: " + v; }, [Number] })
* ]);
*
* expect(injector.get(Number)).toEqual(3);
@ -422,7 +422,7 @@ export class BindingBuilder {
* bind(Number).toAsyncFactory(() => {
* return new Promise((resolve) => resolve(1 + 2));
* }),
* bind(String).toFactory((v) => { return "Value: " + v; }, [String])
* bind(String).toFactory((v) => { return "Value: " + v; }, [Number])
* ]);
*
* injector.asyncGet(Number).then((v) => expect(v).toBe(3));