From b56dd32454adb45ae2d4c5c012ba1aef74d28ddb Mon Sep 17 00:00:00 2001 From: Olivier Combe Date: Mon, 4 Sep 2017 14:06:38 +0200 Subject: [PATCH] refactor(compiler): update template parse error message to ng-template (#19029) PR Close #19029 --- packages/compiler/src/template_parser/template_parser.ts | 2 +- packages/compiler/test/template_parser/template_parser_spec.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/compiler/src/template_parser/template_parser.ts b/packages/compiler/src/template_parser/template_parser.ts index c3b53737e8..17f14a7d4c 100644 --- a/packages/compiler/src/template_parser/template_parser.ts +++ b/packages/compiler/src/template_parser/template_parser.ts @@ -443,7 +443,7 @@ class TemplateParseVisitor implements html.Visitor { const identifier = bindParts[IDENT_KW_IDX]; this._parseVariable(identifier, value, srcSpan, targetVars); } else { - this._reportError(`"let-" is only supported on template elements.`, srcSpan); + this._reportError(`"let-" is only supported on ng-template elements.`, srcSpan); } } else if (bindParts[KW_REF_IDX]) { diff --git a/packages/compiler/test/template_parser/template_parser_spec.ts b/packages/compiler/test/template_parser/template_parser_spec.ts index 6181051dbb..b2db790cf7 100644 --- a/packages/compiler/test/template_parser/template_parser_spec.ts +++ b/packages/compiler/test/template_parser/template_parser_spec.ts @@ -1212,7 +1212,7 @@ There is no directive with "exportAs" set to "dirA" ("
]#a="dirA">< it('should report variables as errors', () => { expect(() => parse('
', [])).toThrowError(`Template parse errors: -"let-" is only supported on template elements. ("
]let-a>
"): TestComp@0:5`); +"let-" is only supported on ng-template elements. ("
]let-a>
"): TestComp@0:5`); }); it('should report duplicate reference names', () => {