|
6 | 6 | * found in the LICENSE file at https://angular.io/license |
7 | 7 | */ |
8 | 8 |
|
9 | | -import {AST, BindingPipe, BindingType, BoundTarget, DYNAMIC_TYPE, ImplicitReceiver, MethodCall, ParsedEventType, ParseSourceSpan, PropertyRead, PropertyWrite, SchemaMetadata, TmplAstBoundAttribute, TmplAstBoundEvent, TmplAstBoundText, TmplAstElement, TmplAstNode, TmplAstReference, TmplAstTemplate, TmplAstTextAttribute, TmplAstVariable} from '@angular/compiler'; |
| 9 | +import {AST, BindingPipe, BindingType, BoundTarget, DYNAMIC_TYPE, ImplicitReceiver, MethodCall, ParsedEventType, ParseSourceSpan, PropertyRead, PropertyWrite, SchemaMetadata, TmplAstBoundAttribute, TmplAstBoundEvent, TmplAstBoundText, TmplAstElement, TmplAstIcu, TmplAstNode, TmplAstReference, TmplAstTemplate, TmplAstTextAttribute, TmplAstVariable} from '@angular/compiler'; |
10 | 10 | import * as ts from 'typescript'; |
11 | 11 |
|
12 | 12 | import {Reference} from '../../imports'; |
@@ -1333,6 +1333,8 @@ class Scope { |
1333 | 1333 | this.checkAndAppendReferencesOfNode(node); |
1334 | 1334 | } else if (node instanceof TmplAstBoundText) { |
1335 | 1335 | this.opQueue.push(new TcbTextInterpolationOp(this.tcb, this, node)); |
| 1336 | + } else if (node instanceof TmplAstIcu) { |
| 1337 | + this.appendIcuExpressions(node); |
1336 | 1338 | } |
1337 | 1339 | } |
1338 | 1340 |
|
@@ -1459,6 +1461,17 @@ class Scope { |
1459 | 1461 | this.appendDeepSchemaChecks(node.children); |
1460 | 1462 | } |
1461 | 1463 | } |
| 1464 | + |
| 1465 | + private appendIcuExpressions(node: TmplAstIcu): void { |
| 1466 | + for (const variable of Object.values(node.vars)) { |
| 1467 | + this.opQueue.push(new TcbTextInterpolationOp(this.tcb, this, variable)); |
| 1468 | + } |
| 1469 | + for (const placeholder of Object.values(node.placeholders)) { |
| 1470 | + if (placeholder instanceof TmplAstBoundText) { |
| 1471 | + this.opQueue.push(new TcbTextInterpolationOp(this.tcb, this, placeholder)); |
| 1472 | + } |
| 1473 | + } |
| 1474 | + } |
1462 | 1475 | } |
1463 | 1476 |
|
1464 | 1477 | interface TcbBoundInput { |
|
0 commit comments