Article From:https://segmentfault.com/q/1010000011358481
Question:

angular-cliCreate a new IMGs folder under the assets folder to store pictures. You can use these pictures normally when you ng server, but the pictures are invalid after ng build.

In the CSS file, use the following:

In the HTML file, use the following:

There are appeals in all two ways. I hope the great God can answer them.

Answer 0:

Picture paths are determined by the location of the index. html, such as the index. HTML and assets folder, and the path can be written`
src=’assets/a.jpg’

Similar Posts:

Leave a Reply

Your email address will not be published. Required fields are marked *