dynamic md-font-icon
Hi, when adding md-font-icon attr as a scope param it doesn't render the icon (doesn't add the className to the element). same md-icon element, deferent icon name with every page of the app.
when navigating inside the app sometimes the previous page icon is rendered.
< md-icon md-font-icon="{{myIconName}}" >
i can too confirm this behavior
@NirAviel try using ng-class instead of md-font-icon. Here is an example using "font awesome"
<md-icon ng-class="{'fa': true, 'fa-circle': true}">
^ This is working for me, hope that helps...
@NirAviel - md-font-icon and md-font-set are currently only supported as attributes with the following properties: 1x, read-only, non-dynamic attributes.
@rickycheers - for your example, would <md-icon class="fa fa-circle"></md-icon> not be better?
Thanks for the replies, I know how to make it work but I want it to work as it should and not go all over my app and change all the icons (wasn't on production yet so I had some time to wait but no more...).
@ThomasBurleson thanks for the great work. Can you elaborate on the decision to make svg Icons dynamic (i.e. using observe/watch) but not font icons?
Hello,
I have started a project and I would like to use md-icon in a ng-repeat. please, could you give a light about it
<tr ng-repeat="estudio in estudios_es">
<td>{{estudio.idestudio}}</td>
<td><input type="text" ng-model="estudio.nomEstudio" /></td>
<td>{{estudio.comentario}}</td>
<td>
<md-button class="md-icon-button" ng-click="editar_estudio(estudio, $index)">
<md-icon class="material-icons" aria-label="edit">mode_edit</md-icon>
</md-button>
</td>
</tr>
I would like that when I click on item, the icon changes and when I click on it again, this icon changes back again.
These are two icons that I want to use:
<md-icon class="material-icons" aria-label="edit">mode_edit</md-icon>
<md-icon class="material-icons" aria-label="edit">done</md-icon>
Thank you in advance for your help !!!!!
josepfdc