-
Notifications
You must be signed in to change notification settings - Fork 24.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Structural directive autocompletion #40032
Commits on Dec 12, 2020
-
refactor(language-service): add context to template target system
This commit extends the template targeting system, which determines the node being referenced given a template position, to return additional context if needed about the particular aspect of the node to which the position refers. For example, a position pointing to an element node may be pointing either to its tag name or to somewhere in the node body. This is the difference between `<div|>` and `<div foo | bar>`.
Configuration menu - View commit details
-
Copy full SHA for fea0ea9 - Browse repository at this point
Copy the full SHA fea0ea9View commit details -
feat(language-service): autocompletion of element tags
This commit expands the autocompletion capabilities of the language service to include element tag names. It presents both DOM elements from the Angular DOM schema as well as any components (or directives with element selectors) that are in scope within the template as options for completion.
Configuration menu - View commit details
-
Copy full SHA for 59415c8 - Browse repository at this point
Copy the full SHA 59415c8View commit details -
refactor(compiler-cli): make
TypeCheckingScopeRegistry
a general ut……ility The `annotations` package in the compiler previously contained a registry which tracks NgModule scopes for template type-checking, including unifying all type-checking metadata across class inheritance lines. This commit generalizes this utility and prepares it for use in the `TemplateTypeChecker` as well, to back APIs used by the language service.
Configuration menu - View commit details
-
Copy full SHA for 75a9037 - Browse repository at this point
Copy the full SHA 75a9037View commit details -
refactor(compiler-cli): introduce APIs to support directive autocompl…
…etion This commit adds two new APIs to the `TemplateTypeChecker`: `getPotentialDomBindings` and `getDirectiveMetadata`. Together, these will support the Language Service in performing autocompletion of directive inputs/outputs.
Configuration menu - View commit details
-
Copy full SHA for 535d52b - Browse repository at this point
Copy the full SHA 535d52bView commit details -
feat(language-service): complete attributes on elements
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.
Configuration menu - View commit details
-
Copy full SHA for 8f81140 - Browse repository at this point
Copy the full SHA 8f81140View commit details -
feat(language-service): autocomplete pipe binding expressions
This commit adds autocompletion for pipe expressions, built on existing APIs for checking which pipes are in scope.
Configuration menu - View commit details
-
Copy full SHA for a8bc91c - Browse repository at this point
Copy the full SHA a8bc91cView commit details -
refactor(compiler-cli): identify structural directives
This commit introduces an `isStructural` flag on directive metadata, which is `true` if the directive injects `TemplateRef` (and thus is at least theoretically usable as a structural directive). The flag is not used for anything currently, but will be utilized by the Language Service to offer better autocompletion results for structural directives.
Configuration menu - View commit details
-
Copy full SHA for 468fa4b - Browse repository at this point
Copy the full SHA 468fa4bView commit details -
feat(language-service): completions for structural directives
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.
Configuration menu - View commit details
-
Copy full SHA for 4243377 - Browse repository at this point
Copy the full SHA 4243377View commit details