Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't use with interpolated / bind / variable or values #2

Open
matheusdavidson opened this issue Apr 27, 2017 · 2 comments
Open

Can't use with interpolated / bind / variable or values #2

matheusdavidson opened this issue Apr 27, 2017 · 2 comments
Milestone

Comments

@matheusdavidson
Copy link

Hi, i can use this with a fixed value like <ion-icon md-name="settings"></ion-icon>, but it won't work with interpolated/bind values like <ion-icon [md-name]="variable"></ion-icon> or <ion-icon md-name="{{variable}}"></ion-icon>.

@matheusdavidson
Copy link
Author

matheusdavidson commented Apr 27, 2017

The problem is your css or font is tied to the attribute md-name, but when you interpolate or bind, the attribute seems to be removed form the html. A quick workaround is to add an extra empty md-name when interpolating:
<ion-icon md-name [md-name]="'settings'"></ion-icon>

@ihadeed
Copy link
Member

ihadeed commented Apr 27, 2017

Thanks for pointing this out. I will look into it. Maybe it can become something like this:

<!-- fixed value -->
<ion-icon md name="settings"></ion-icon>
<!-- with variable -->
<ion-icon md [name]="someVariable"></ion-icon>

@ihadeed ihadeed added this to the 2.x milestone Sep 19, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants