feat(language-service): completions for output $event properties in (#34570)

This commit adds support for completions of properties on `$event`
variables in bound outputs.

This is the second major PR to support completions for `$event`
variables (https://github.com/angular/vscode-ng-language-service/issues/531).
The final completion support that must be provided is for `$event`
variables in bindings targeting DOM events, like `(click)`.

PR Close #34570
This commit is contained in:
ayazhafiz
2019-12-26 13:26:54 -06:00
committed by Andrew Kushnir
parent 24864ee71e
commit e7c74cbd69
6 changed files with 64 additions and 24 deletions

View File

@ -109,7 +109,7 @@ function locateSymbol(ast: TemplateAst, path: TemplateAstPath, info: AstResult):
visitVariable(ast) {},
visitEvent(ast) {
if (!attributeValueSymbol()) {
symbol = findOutputBinding(info, path, ast);
symbol = findOutputBinding(ast, path, info.template.query);
symbol = symbol && new OverrideKindSymbol(symbol, DirectiveKind.EVENT);
span = spanOf(ast);
}