arkon / ng-inline-svg

[Inactive] Angular directive for inserting an SVG file inline within an element.
https://echeung.me/ng-inline-svg/
MIT License
210 stars 88 forks source link

Example for using setSVGAttributes #105

Closed apawsey closed 5 years ago

apawsey commented 5 years ago

Thanks for the project!

For the life of me, I cannot figure out how to use setSVGAttributes... all I get is: Can't bind to 'setSVGAttributes' since it isn't a known property of 'div'

Could you give any kind of example?

Thanks.

arkon commented 5 years ago

It hasn't been released yet. :)

apawsey commented 5 years ago

Ah... Well that's kinda mean! 😄 I didn't think to compare the package code with the code in the repository. As I understand it,this would be the way to set the viewbox on the svg tag?

apawsey commented 5 years ago

Ok, I got the latest by installing straight from GitHub, and it works perfectly.

Just for others, syntax used: <div [inlineSVG]="...url" [setSVGAttributes]="{viewBox: '0 0 100 100' }">