Skip to content

Commit 66378ed

Browse files
committed
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
1 parent c0ab43f commit 66378ed

File tree

8 files changed

+993
-35
lines changed

8 files changed

+993
-35
lines changed

packages/language-service/ivy/BUILD.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ ts_library(
1111
"//packages/compiler-cli/src/ngtsc/core",
1212
"//packages/compiler-cli/src/ngtsc/core:api",
1313
"//packages/compiler-cli/src/ngtsc/file_system",
14+
"//packages/compiler-cli/src/ngtsc/imports",
1415
"//packages/compiler-cli/src/ngtsc/incremental",
1516
"//packages/compiler-cli/src/ngtsc/metadata",
1617
"//packages/compiler-cli/src/ngtsc/reflection",

0 commit comments

Comments
 (0)