Open simonh1000 opened 10 years ago
Yep, i'm wondering how to use this yet....
+1
Give the url for any .svg file in the icon attribute.. :)
Well, here I've prepared a fiddle trying to get this working, but I couldn't. Can you help me with this? What is missing?
You only need to direct the icon to the right url..
@wesleycoder You need the
yeah I looked at the example in the demo site, I should've paid more attention to that. thanks anyway :)
I've updated the Plunkr, (sorry about the fist, something with the save)...
This one has everything to run angular-material but the icon is placed in full width... no css is aplied...
The <material-icon>
[in its current functionality] can only be used to display SVG(s); it uses the object element and references an external SVG file. This approach is currently the most popular way to add SVG to a page served up as HTML.
@see Using SVGs
The icon
attribute is transposed and assigned to the data attribute in <object data="">
. As such, the <material-icon>
does not currently support any other formats (PNG, JPEG, etc).
The Angular Material team is aware of these issues. Revisions for this component are planned.
Thank you, very clear
Would be great to have a couple of hints on syntax: e.g.
<material-icon icon="icons/ic_access_time_24px.svg"></material-icon>
does not work :-(