How to load image (and other assets) in Angular an project?

前端 未结 8 1059
猫巷女王i
猫巷女王i 2020-11-29 03:14

I\'m pretty new to Angular so I\'m not sure the best practice to do this.

I used angular-cli and ng new some-project to generate a new app.

In

8条回答
  •  爱一瞬间的悲伤
    2020-11-29 03:33

    Being specific to Angular2 to 5, we can bind image path using property binding as below. Image path is enclosed by the single quotation marks.

    Sample example

    image

提交回复
热议问题