AngularJS <input> with type set to 'number', how to force a initial display of value to a non-number string
问题 I am wondering using Angular, if the <input> has 'type' set to 'number', can you force a initial display of a non-number string if ng-model is initialized to certain number (0 in my example)? My example code is here: http://plnkr.co/edit/TwraJlxZSd3TeSYscExq?p=info This topic is related to: [1]: 'AngularJS directives to hide zero when <input> is initially loaded to the DOM' and: [2]: 'Hide Value in input when it's zero in angular Js' 回答1: The following directive will solve your problem, app