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

md-icon does not render when class attribute is present #4069

Closed
sanketsaurav opened this issue Aug 8, 2015 · 7 comments
Closed

md-icon does not render when class attribute is present #4069

sanketsaurav opened this issue Aug 8, 2015 · 7 comments
Assignees
Labels
resolution: can't reproduce The team is unable to reproduce this issue with the information provided
Milestone

Comments

@sanketsaurav
Copy link

When a class attribute is present on the <md-icon> directive, the icon fails to render. This was working in v10.0.0, but in v0.10.1-rc5, it's broken. When there is no class attribute present, the icon renders fine.

Edit: When the class is added using ng-class, the icon renders fine.

@mribichich
Copy link

I saw in the change log before on one of the RC releases as a breaking change.
Now it is listed as a Bug Fix:

icons: improve use of material-icons style (dab30b3, closes #3333)

which says:

Improve logic to auto-add .material-icons style to md-icon.

NOTE: will not auto-add if using any class or ng-class attributes; see demoFontIconsWithLigatures

@norkunas
Copy link
Contributor

If this is intended, i think it should work at least only if using md-hue- classes.

@joalcega
Copy link

'md-icon' renders with classes only if it is inside of a 'p' or 'div' element.

@innerpeace0
Copy link

+1

@warpdesign
Copy link

+1

Possible workaround: add md-font-set="" and it will work without having to remove the class you added.

@ThomasBurleson ThomasBurleson added this to the 0.12.0 milestone Sep 2, 2015
@programmist
Copy link
Contributor

@sanketsaurav I'm unable to reproduce this issue. The md-icon demos all use a class attribute and they seem to display properly. Could you help me reproduce this?

@programmist programmist added the resolution: can't reproduce The team is unable to reproduce this issue with the information provided label Sep 23, 2015
@programmist
Copy link
Contributor

I've also tried, unsuccessfully, to reproduce the via codepen using the latest snapshot.
http://codepen.io/programmist/pen/avNzyX

It's been a week since my last message, so I'm closing this issue. If you continue to experience problems feel free to re-open.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
resolution: can't reproduce The team is unable to reproduce this issue with the information provided
Projects
None yet
Development

No branches or pull requests

8 participants