From 42f6baeaecaa8eca00dfb1c1dd6e1f2948d553d1 Mon Sep 17 00:00:00 2001 From: Kevin Western Date: Sun, 3 May 2015 16:14:32 -0700 Subject: [PATCH] Fix documentation for toFactory and toAsyncFactory The bound String classes should have a dependency on Number, not String. Closes #1654 --- modules/angular2/src/di/binding.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/angular2/src/di/binding.ts b/modules/angular2/src/di/binding.ts index 86284c6b85..7ab618a8dc 100644 --- a/modules/angular2/src/di/binding.ts +++ b/modules/angular2/src/di/binding.ts @@ -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));