![](/img/trans.png)
[英]NG0303: Can't bind to 'ngbTooltip' since it isn't a known property of 'button'
[英]NG0303: Can't bind to 'ngif' since it isn't a known property of 'div'
我嘗試使用文檔學習 Angular 但我有一個錯誤但此代碼有效(我通過本教程學習https://angular.io/tutorial/toh-pt4 ):
NG0303:無法綁定到“ngif”,因為它不是“div”的已知屬性。
我發現我應該在 app.module.ts 中導入 commonModule。 但它不起作用。 為什么? 你認為通過官方文檔學習是個好主意嗎?
請使用如下格式:
<div *ngIf="condition; else elseBlock">
Content to render when condition is true.
</div>
<ng-template #elseBlock>Content to render when condition is false.
</ng-template>
Me paso algo similar lo que me faltaba era agregar el componente en declarations de modulo del componente
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.