问题
hi all i am using angularjs
editable-text i am trying to do when i enter the in editable-text that value should be changed to uppercase while i typing but i am not able to get my need anyone can help
here i attached my fiddle :http://jsfiddle.net/ckosloski/NfPcH/19035/
回答1:
add this in your controller
$scope.convertToUpperCase = function(user){
user.name = user.name.toUpperCase();
}
and call it on onshow
<a href="#" editable-text="user.name" onshow="convertToUpperCase(user)">{{ user.name || 'empty' }}</a>
see this http://jsfiddle.net/NfPcH/19577/
来源:https://stackoverflow.com/questions/44568522/enter-value-auto-caps-in-editable-text-using-angularjs