Linked Questions

Popular Questions

Apply parseFloat on ng-model

Asked by At

I am trying to print Float value on the input field using ng-model. But it's not displaying. If I use value instead of ng-model then it's getting displayed.

Here's my code:

<input id="cost" name="cost" type="number" ng-model="parseFloat(cost_per_month)">

If I use value insted of ng-model:

<input id="cost" name="cost" type="number" value="cost_per_month">

Here's my controller:

$scope.selectedcost = parseFloat(orgprojects.cost_per_month);

Related Questions