The difference in absolute paths using img tags between html in angular6 and ordinary html

  1. make a separate HTML file, in which a picture is referenced by an absolute address using the img tag, which shows successfully

    , but the same code is not displayed when I put it in the html file of angular6, and there is no error on the console
  2. .
  3. is it my hand wave or do I really want to treat it differently?
Oct.14,2021

is determined by the packaging configuration of CLI .

to write this directly points to the source root directory, usually the src directory.
such as reads the assets directory files under src .

therefore, it is not advisable to deduct the picture resources into the project and read the hard disk files directly.

Menu