Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Syntax for use #2

Open
simonh1000 opened this issue Sep 4, 2014 · 10 comments
Open

Syntax for use #2

simonh1000 opened this issue Sep 4, 2014 · 10 comments

Comments

@simonh1000
Copy link

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 :-(

@ghost
Copy link

ghost commented Sep 9, 2014

Yep, i'm wondering how to use this yet....

@ghost
Copy link

ghost commented Oct 3, 2014

+1

@junaidurfjd
Copy link

Give the url for any .svg file in the icon attribute.. :)

@ghost
Copy link

ghost commented Oct 5, 2014

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?

@junaidurfjd
Copy link

You only need to direct the icon to the right url..

@junaidurfjd
Copy link

@wesleycoder You need the directive to be in a working angular app..

@ghost
Copy link

ghost commented Oct 6, 2014

yeah I looked at the example in the demo site, I should've paid more attention to that. thanks anyway :)

@ghost
Copy link

ghost commented Oct 10, 2014

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...

http://plnkr.co/edit/0YyCNF

@ThomasBurleson
Copy link

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.

@ghost
Copy link

ghost commented Oct 10, 2014

Thank you, very clear

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants