如何处理Angular应用的错误消息: No pipe found with name async
生活随笔
收集整理的這篇文章主要介紹了
如何处理Angular应用的错误消息: No pipe found with name async
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
錯誤消息:
Failed to compile.
src/app/ngrxdemo/container/component/counter/counter.component.html:8:27 - error NG8004: No pipe found with name ‘async’.
8 當前數:{{ counter$ | async }}
~~~~~
src/app/ngrxdemo/container/component/counter/counter.component.ts:9:16
9 templateUrl: ‘./counter.component.html’,
~~~~~~~~~~~~~~~~~~~~~~~~~~
Error occurs in the template of component CounterComponent.
雖然CounterComponent作為child Component,其parent Component里已經申明了包含async pipe的Common Module,但是仍然需要在child Component里也import Common Module:
import之后問題解決:
要獲取更多Jerry的原創文章,請關注公眾號"汪子熙":
總結
以上是生活随笔為你收集整理的如何处理Angular应用的错误消息: No pipe found with name async的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 如何处理使用ngrx时遇到的错误消息:
- 下一篇: 在Angular应用里使用Redux