button-icon-only class incorrectly added to button that contains data binding
Short description of the problem:
Buttons that have data binding inside of them ({{'data'}}) and an icon incorrectly get the button-icon-only class.
Steps to reproduce:
<button round outline small>
<ion-icon name="call-outline"></ion-icon>
{{'testing'}}
</button>
Results in the following rendered html:
<button outline="" round="" small="" class="disable-hover button button-outline button-round button-small button-icon-only" ng-reflect-small="" ng-reflect-outline="" ng-reflect-round=""><span class="button-inner">
<ion-icon name="call-outline" role="img" class="ion-ios-call-outline" aria-label="call outline" ng-reflect-name="call-outline"></ion-icon>
testing
</span><ion-button-effect></ion-button-effect></button>
Notice the button-icon-only class that should not be there.
Which Ionic Version? 1.x or 2.x Ionic 2.0.0 beta 9
Plunker that shows an example of your issue
http://plnkr.co/edit/jaMbkDfqCurh9TiNAX1E?p=preview
@sdsanders thanks for submitting the issue!
@adamdbradley @jgw96 confirmed this is an issue. I think we should refactor the Button class to have a more "angularish" approach by using @ContentChildren etc. right now, if we add/remove icons/text dynamically, some classes are incorrect.
This is not longer an issue since you have to specify manually when a button is "icon-only"
<button ion-button icon-only>
</button>