1

I have select box and have default value is text "please select one", I need solution while if any other option is selected (eq. abc) and user need to clear what he has selected(important is getting default value selected again) with button("Clear and go Next") event.

http://plnkr.co/edit/HIOOHBHaibHmDtiLdGfh?p=preview

<select ng-model="item" ng-options="item.name for item in options"
    ng-change="doSomething()">
    <option value="">Please select one</option>
</select>

1 Answer 1

3

I'm not entirely sure what you're asking, but if you need to clear the selected value, you can do something as simple as:

HTML

<button ng-click="reset()">Clear and move Next</button>

JS

$scope.reset = function() {
  $scope.item = "";
}

Plunk

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.