angular-cn/packages/compiler/test/template_parser
ayazhafiz a92d97cda7 fix(compiler): report errors for missing binding names (#34595)
Currently, would-be binding attributes that are missing binding names
are not parsed as bindings, and fall through as regular attributes. In
some cases, this can lead to a runtime error; trying to assign `#` as a
DOM attribute in an element like in `<div #></div>` fails because `#` is
not a valid attribute name.

Attributes composed of binding prefixes but not defining a binding
should be considered invalid, as this almost certainly indicates an
unintentional elision of a binding by the developer. This commit
introduces error reporting for attributes with a binding name prefix but
no actual binding name.

Closes https://github.com/angular/vscode-ng-language-service/issues/293.

PR Close #34595
2020-02-10 16:29:32 -08:00
..
util test(compiler): add expression absolute span tests for `TemplateAst`s (#33253) 2019-10-24 09:53:58 -07:00
binding_parser_spec.ts build: remove `main()` from specs (#21053) 2017-12-22 13:10:51 -08:00
template_parser_absolute_span_spec.ts test(compiler): add expression absolute span tests for `TemplateAst`s (#33253) 2019-10-24 09:53:58 -07:00
template_parser_spec.ts fix(compiler): report errors for missing binding names (#34595) 2020-02-10 16:29:32 -08:00
template_preparser_spec.ts build: remove `main()` from specs (#21053) 2017-12-22 13:10:51 -08:00