I have following input and it updates model on blur event.
<input
es-max-type
class="headline"
ng-change="edit(selectedRow, '{{selectedRow.name}}');"
ng-model="selectedRow.name"
ng-model-options="{ updateOn: 'blur' }"/>
es-max-type directive is watching for string length.
scope.$watch(function() {
return scope.ngModel
}, function(text) {
if(text) {
scope.currentLen = text.length;
}
});
Whenever input is focused I'm showing in corner "15/100" number of characters. But since model is updated only on blur event, I'm unable to track changes during editing. Is there a way to get string length without removing update on blur?