I am trying to initialize my model discharge.total
with value 0,such that text box is by default populated with 0.
But textbox is not prepopulating.
Please Note:
I dont want model to initialize in controller.
- I have already initialized
$scope.discharge = {}
in controller
<body ng-app>
<div ng-controller="testController" >
<input ng-init="discharge.total = 0 " class=" form-control" type="text" ng-model="discharge.total" disabled>
</div>
</body>