Commit Graph

3 Commits

Author SHA1 Message Date
ivanwonder 8110cf0ed2 fix(language-service): can't provide the Input and Output custom binding property name (#41005)
Now the language service always uses the name of the JavaScript property on the
component or directive instance for this input or output. This PR will use the right
binding property name.

PR Close #41005
2021-03-01 15:26:42 -08:00
Alex Rickabaugh 2a7443117b feat(language-service): completions for structural directives (#40032)
This comit adds support for autocompletion of attributes that create
structural directives. Such completions differ from those of normal
attributes, as the structural directive syntax creates a synthetic
<ng-template> node which has different attributes from the main element.

PR Close #40032
2020-12-14 12:08:41 -08:00
Alex Rickabaugh 66378ed0ef feat(language-service): complete attributes on elements (#40032)
This commit adds attribute completion to the Language Service. It completes
from 3 sources:

1. inputs/outputs of directives currently present on the element
2. inputs/outputs/attributes of directives in scope for the element, that
   would become present if the input/output/attribute was added
3. DOM properties and attributes

We distinguish between completion of a property binding (`[foo|]`) and a
completion in an attribute context (`foo|`). For the latter, bindings to
the attribute are offered, as well as a property binding which adds the
square bracket notation.

To determine hypothetical matches (directives which would become present if
a binding is added), directives in scope are scanned and matched against a
hypothetical version of the element which has the attribute.

PR Close #40032
2020-12-14 12:08:41 -08:00