打开app.component.html文件,添加angular提供的if else 写法。 如图所示. 代码:. <ng-container *ngIf="bool; else elseTemplate">. bool为true显示.
確定! 回上一頁