<div *ngIf="canEdit; else noEdit">
<p>You can edit the following paragraph.</p>
</div>
<ng-template #noEdit>
<p>The following paragraph is read only. Try clicking the button!</p>
</ng-template>
Angular中 ng-template 的用法
最新推荐文章于 2022-07-29 14:07:11 发布