feat(language-service): provide completion for $event variable (#34570)

This commit adds a completion for the `$event` variable in bound event
expressions.

This is the first in a series of PRs to support completions for
properties on `$event` variables (https://github.com/angular/vscode-ng-language-service/issues/531).

PR Close #34570
This commit is contained in:
ayazhafiz
2019-12-26 08:44:14 -06:00
committed by Andrew Kushnir
parent 90b303faa3
commit 24864ee71e
2 changed files with 11 additions and 0 deletions

View File

@ -316,6 +316,7 @@ function attributeValueCompletions(info: AstResult, htmlPath: HtmlAstPath): ng.C
templatePath.tail.visit(visitor, null);
return visitor.results;
}
// In order to provide accurate attribute value completion, we need to know
// what the LHS is, and construct the proper AST if it is missing.
const htmlAttr = htmlPath.tail as Attribute;