<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-09-15 21:21:48 发布