Can't bind to ':xlink:href' since it isn't a known property of ':svg:image'

后端 未结 1 1701
攒了一身酷
攒了一身酷 2020-12-19 04:06

I am trying to set dynamicly href for svg image like this :


    

        
1条回答
  •  醉梦人生
    2020-12-19 04:41

    Since xlink:href is an attribute but not a property of the SVG image element, use attribute binding:

    [attr.xlink:href]="logoFile"
    

    See this stackblitz for a demo.

    0 讨论(0)
提交回复
热议问题