fix(compiler-cli): report NG8030 when a class-based query predicate blocks deferred lazy loading by arturovt · Pull Request #69503 · angular/angular · GitHub
Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions packages/compiler-cli/src/ngtsc/diagnostics/src/error_code.ts
Original file line number Diff line number Diff line change
Expand Up @@ -485,6 +485,13 @@ export enum ErrorCode {
*/
CONFLICTING_CONTENT_AND_PROPERTY = 8029,

/**
* A `viewChild` or `contentChild` query uses a component class as its predicate, but that
* component is only used inside a `@defer` block. The class reference prevents the component
* from being lazily loaded. Use a string-based query with a template reference variable instead.
*/
DEFERRED_COMPONENT_USED_IN_QUERY = 8030,

/**
* A two way binding in a template has an incorrect syntax,
* parentheses outside brackets. For example:
Expand Down
197 changes: 194 additions & 3 deletions packages/compiler-cli/test/ngtsc/defer_spec.ts
Loading