diff --git a/modules/@angular/compiler/src/template_parser.ts b/modules/@angular/compiler/src/template_parser.ts index 40361534b1..4d657fa884 100644 --- a/modules/@angular/compiler/src/template_parser.ts +++ b/modules/@angular/compiler/src/template_parser.ts @@ -824,7 +824,7 @@ class TemplateParseVisitor implements HtmlAstVisitor { } elementProps.forEach(prop => { this._reportError( - `Property binding ${prop.name} not used by any directive on an embedded template`, + `Property binding ${prop.name} not used by any directive on an embedded template. Make sure that the property name is spelled correctly and all directives are listed in the "directives" section.`, sourceSpan); }); } @@ -840,7 +840,7 @@ class TemplateParseVisitor implements HtmlAstVisitor { events.forEach(event => { if (isPresent(event.target) || !SetWrapper.has(allDirectiveEvents, event.name)) { this._reportError( - `Event binding ${event.fullName} not emitted by any directive on an embedded template`, + `Event binding ${event.fullName} not emitted by any directive on an embedded template. Make sure that the event name is spelled correctly and all directives are listed in the "directives" section.`, event.sourceSpan); } }); diff --git a/modules/@angular/compiler/test/template_parser_spec.ts b/modules/@angular/compiler/test/template_parser_spec.ts index e5c62ca1cc..c09c59ca3f 100644 --- a/modules/@angular/compiler/test/template_parser_spec.ts +++ b/modules/@angular/compiler/test/template_parser_spec.ts @@ -1220,9 +1220,9 @@ More than one component: DirB,DirA ("[ERROR ->]
"): TestComp@0:0`); }); expect(() => parse('', [dirA])) .toThrowError(`Template parse errors: -Event binding e not emitted by any directive on an embedded template (""): TestComp@0:18 +Event binding e not emitted by any directive on an embedded template. Make sure that the event name is spelled correctly and all directives are listed in the "directives" section. (""): TestComp@0:18 Components on an embedded template: DirA ("[ERROR ->]"): TestComp@0:0 -Property binding a not used by any directive on an embedded template ("[ERROR ->]"): TestComp@0:0`); +Property binding a not used by any directive on an embedded template. Make sure that the property name is spelled correctly and all directives are listed in the "directives" section. ("[ERROR ->]"): TestComp@0:0`); }); it('should not allow components or element bindings on inline embedded templates', () => { @@ -1234,7 +1234,7 @@ Property binding a not used by any directive on an embedded template ("[ERROR -> }); expect(() => parse('
', [dirA])).toThrowError(`Template parse errors: Components on an embedded template: DirA ("[ERROR ->]
"): TestComp@0:0 -Property binding a not used by any directive on an embedded template ("[ERROR ->]
"): TestComp@0:0`); +Property binding a not used by any directive on an embedded template. Make sure that the property name is spelled correctly and all directives are listed in the "directives" section. ("[ERROR ->]
"): TestComp@0:0`); }); });