What's better to use in Angular - src or [src]

前端 未结 3 1158
自闭症患者
自闭症患者 2020-12-20 18:17

Just want to ask what is recommended to use with Angular, standard html src or Angular [src]? And why?

Edit: I have follow

3条回答
  •  -上瘾入骨i
    2020-12-20 18:28

    If you have static anchor link, then go ahead with

    
    

    When binding from the component, then either of the below will work.

    
    
    

    In component.ts

    image_src: string = '../app/media/appLogo.png';
    

提交回复
热议问题