Angular的允许您将上下文传递给outlet以进行属性绑定。</span></ng-template><ng-container *ngIf="isConditionTrue; then onecondition is true</ng-template>
<ng-template #two>This s
以下面的模板为例。Im使用as语法创建用户的模板上下文,并希望将该上下文传递给userTmpl。据我所知,除了ngIf条件所使用的内容之外,没有任何方法可以传递上下文。<ng-container *ngIf="user$ | async as user">
<ng-container *ngIf="showUser; then userTmpl; else em