Reputation: 262
i have an error on setting a value in controller like this 01234
and turning it to string for not removing the 0
and getting error on input type number
for using the string
as a value , i want to showing the zero in input field and cant switch to input type text
!
Upvotes: 1
Views: 249
Reputation: 2683
You can just use type tel
<input type="tel" ng-model="myNumber">
and then in controller
$scope.myNumber = "01234";
See this plunker http://plnkr.co/edit/Y5GQiLpENthi7ccok5hJ?p=preview
Upvotes: 1