diff --git a/modules/angular2/src/di/exceptions.js b/modules/angular2/src/di/exceptions.js index 2bdb8ebfd8..c436d9f1e8 100644 --- a/modules/angular2/src/di/exceptions.js +++ b/modules/angular2/src/di/exceptions.js @@ -106,7 +106,8 @@ export class NoAnnotationError extends Error { message:string; constructor(typeOrFunc) { super(); - this.message = `Cannot resolve all parameters for ${stringify(typeOrFunc)}`; + this.message = `Cannot resolve all parameters for ${stringify(typeOrFunc)}.` + + ` Make sure they all have valid type or annotations.`; } toString() { diff --git a/modules/angular2/test/di/injector_spec.js b/modules/angular2/test/di/injector_spec.js index 508519d148..b31e72a171 100644 --- a/modules/angular2/test/di/injector_spec.js +++ b/modules/angular2/test/di/injector_spec.js @@ -100,7 +100,8 @@ export function main() { it('should throw when no type and not @Inject', function () { expect(() => Injector.resolveAndCreate([NoAnnotations])).toThrowError( - 'Cannot resolve all parameters for NoAnnotations'); + 'Cannot resolve all parameters for NoAnnotations. '+ + 'Make sure they all have valid type or annotations.'); }); it('should cache instances', function () {