I have a data table that is in-line editable. One of the columns that is editable is an md-input field. I can easily enough add md-maxlength="80" to show the character counter. Given that this data table is done with UI-Grid (that code isn't relevant here), it applies the counter to all md-inputs in that column. What I really want is it to only show the character counter on focus. This is using Angular 1.X.
Ive got this so far, but I dont know if the expression to ng-class can accept anything except CSS classes.
<md-input
ng-init="focused=false"
ng-class="{'md-maxlength=80': focused}"
ng-focus="focused=true"
ng-blur="focused=false"
...
</md-input>