hi all i am using angularjs ng-repeat i have checkbox and dropdown in inside the repeat now my need is when check the checkbox value i want bind the dropdown but now when i check the checkbox all dropdown values are changed but my need i want bind the dropdown based checkbox help how to solve
ng-repeat code
<div ng-repeat="BFMaterialStream in BFMaterialStreams">
<input type="checkbox" ng-change="checkchange(BFMaterialStream.MaterialStream,$index)"
ng-model="selection.ids[BFMaterialStream.MaterialStream]" name="group" id="BFMaterialStream.MaterialStream" />
<select id="MaterialElevator" tabindex="7" required typeof="text" name="Elevator"
form="DistanceMatrixFormId" class="form-control"
ng-model="ViewGetBUMaterialStream.ToElevator"
>
<option value=''>Select</option>
<option ng-repeat="ViewGetBUMaterialStream in ViewGetBUMaterialStreams "
value=""
>
</option>
</select>
</div>
check change time bind code
$scope.checkchange=function(Stream,index){
$http.get('/ViewGetBUMaterialStream/' + Stream ).then(function (response) {
$scope.ViewGetBUMaterialStreams = response.data;
});
}
Aucun commentaire:
Enregistrer un commentaire