这似乎是“@angular/common”模块和常春藤编译器的问题?有任何想法吗?删除 node_modules 并更新 angular 没有任何成功。
<!-- Define our template -->
<ng-template #myTemplate> World! </ng-template>
Hello
<!-- Render the template in this outlet -->
<ng-container [ngTemplateOutlet]="myTemplate"></ng-container>
如果我尝试 ...*ngTemplateOutlet=... 那么我在运行时收到此错误:NG0303: Can't bind to 'ngTemplateOutlet' 因为它不是 'ng-container' 的已知属性。node_modules/@angular/core/ivy_ngcc/fesm2015/core.js : 10073
角度版本 11