How can I clear input values to null after clicking on a button?
Empty fields:
https://i.sstatic.net/JDTZA.jpg
Fields with existing values that I want to reset back to empty fields.
https://i.sstatic.net/T5iKc.jpg
HTML:
<label class="item item-input">
<input id="tezina" type="number" placeholder="Tezina" ng-model="podaci.tezina">
</label>
<label class="item item-input">
<input id="mamac" type="text" placeholder="Mamac" ng-model="podaci.mamac">
</label>
<label class="item item-input">
<input id="pribor" type="text" placeholder="Pribor" ng-model="podaci.pribor">
</label>+
<button class="button button-positive" ng-click="clearFields()">Clear</button>
I attempted the following function in the controller (which is not working):
$scope.clearFields = function() {
$scope.podaci = null;
}