WebPackを使用する場合は、ビルド中にパスを処理します。 <img src="...">
は、プロジェクト内のファイルの物理的な場所を指し示す必要があります。
例えば、私の場合には、WebPACKをせずに、それはimg/
以来
<img src="img/rhamt-square-248.png" width="172">
アプリのルート直下にあるだろう。
のWebPACKとのに対し、これは動作します:
ERROR in ./src/app/misc/about.component.html
Module not found: Error: Can't resolve './img/rhamt-square-248.png' in '/home/ondra/work/Migration/windup-web/ui/src/main/webapp/src/app/misc'
@ ./src/app/misc/about.component.html 1:402-439
@ ./src/app/misc/about.component.ts
@ ./src/app/app.module.ts
@ ./src/main.ts
:
<img src="../../../img/rhamt-square-248.png" width="172">
は、そうでなければあなたは、このようなのようなコンパイルエラーを取得したいです