refactor(core): add static-query template strategy (#29815)
Introduces a new strategy for the `static-query` schematic that is enabled by default. In order to provide a migration that works for the most Angular applications and makes the upgrade as easy as possible, the template strategy leverages the view engine Angular compiler logic in order to determine the query timing that is currently used within applications using view engine. PR Close #29815
This commit is contained in:

committed by
Alex Rickabaugh

parent
0d6c9d36a1
commit
446e3573e3
@ -63,8 +63,8 @@ export class Rule extends Rules.TypedRule {
|
||||
// query definitions to explicitly declare the query timing (static or dynamic)
|
||||
queries.forEach(q => {
|
||||
const queryExpr = q.decorator.node.expression;
|
||||
const timing = usageStrategy.detectTiming(q);
|
||||
const transformedNode = getTransformedQueryCallExpr(q, timing);
|
||||
const {timing, message} = usageStrategy.detectTiming(q);
|
||||
const transformedNode = getTransformedQueryCallExpr(q, timing, !!message);
|
||||
|
||||
if (!transformedNode) {
|
||||
return;
|
||||
|
Reference in New Issue
Block a user