In AngularJS, I have the following sample code:
<select style="margin-left:5px;width:60px" id="product" ng-model="output.product">
<select style="margin-left:5px;width:60px" id="status" ng-model="output.status">
Within my UI screen, I have a button where the user can reset select drop-down values for both product and status but I am unsure how to reset both my ng-model scope output values to null for output.product and output.status.
I have tried scope.output = ""; but this doesn't seem to work.
Again, I have using AngularJS (v1.1).
I am not going to write an answer for AngularJS V1.1 because that version is no longer supported. See AngularJS Version Support Status.
For version 1.7, reset the select by setting the model to
null:The DEMO