if user select "text-box-value-empty", textbox should be disable and textbox should clear. i am using below code for do it. but unfortunately i could not do it. if user enter value and select "text-box-value-empty", textbox should clear.
var app = angular.module('myApp', []);
app.controller('myCtrl', function($scope) {
$scope.myList = [{
text: "1",
value: "option_1"
}, {
text: "2",
value: "option_2"
},];
$scope.sizes = "D,text-box-value-empty,";
$scope.number = function() {
}
});
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.6/angular.min.js"></script>
<!DOCTYPE html>
<html lang="en-US">
<script src="angular.js"></script>
<body>
<div ng-app="myApp" ng-controller="myCtrl">
<div>
<div ng-repeat="a in myList">
<select ng-model="selectedOption" ng-options="choice as choice for (idx, choice) in sizes.split(',')" ng-change="number()">
</select>
<input type="text" ng-model="myval"/>
</div>
</div>
</div>
</body>
</html>