| 1409 | } |
| 1410 | |
| 1411 | @Component({ |
| 1412 | selector: 'inner-cmp', |
| 1413 | template: `<span [i]="log('start')"></span>><ng-container |
| 1414 | [ngTemplateOutlet]="outerTpl" |
| 1415 | ></ng-container |
| 1416 | ><ng-container [ngTemplateOutlet]="tpl"></ng-container>`, |
| 1417 | |
| 1418 | imports: [CommonModule, DummyDirective], |
| 1419 | changeDetection: ChangeDetectionStrategy.Eager, |
| 1420 | }) |
| 1421 | class InnerComp { |
| 1422 | @ContentChild(TemplateRef, {static: true}) tpl!: TemplateRef<any>; |
| 1423 | @Input() outerTpl: TemplateRef<any> | undefined; |
| 1424 | |
| 1425 | constructor(public cdRef: ChangeDetectorRef) {} |
| 1426 | log(id: string) { |
| 1427 | log.push(`inner-${id}`); |
| 1428 | } |
| 1429 | } |
| 1430 | |
| 1431 | let ctx: ComponentFixture<MainComp>; |
| 1432 | let mainComp: MainComp; |