Could not find an NgModule. Use the skip-import option to skip importing in
生活随笔
收集整理的這篇文章主要介紹了
Could not find an NgModule. Use the skip-import option to skip importing in
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
該錯誤消息意思是創建Component時未指定其屬于哪一個module,因此先用命令行ng g m parent創建一個名為parent的module:
默認生成的代碼如下圖所示:
然后使用ng g c 創建一個名為parent-child的Component,使用參數 -m parent掛接到剛才新建的名為parent的module即可。
更多Jerry的原創文章,盡在:“汪子熙”:
總結
以上是生活随笔為你收集整理的Could not find an NgModule. Use the skip-import option to skip importing in的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 死亡细胞藏骨堂在哪里
- 下一篇: Angular NgModule 中的