Mahesh Reddy

Mahesh Reddy

  • NA
  • 363
  • 15.4k

Push multiple values into single model

Feb 6 2020 3:40 AM
Hi,
 
I have 4 values in customer array like below
 
CustomerId
1,2,3,4
 
ex:OrderId=1 has 2 customer id's (2,3)
 
after clicking of edit button
 
in multiple checkbox it was checking last customerid
 
i need to check 2 customer id's
 
coudl you please help me
 
Js 
  1. for (var i = 0; i < $scope.Customer.length; i++) {  
  2. for (var j = 0; j < data.length; j++) {  
  3. if (data[j].CustomerID == $scope.Customer[i].id) {  
  4. $scope.CId = [$scope.Customer[i]];  
  5. break;  
  6. }  
  7. }  
  8. }  
html
  1. <div ng-dropdown-multiselect="" extra-settings="dropdownSetting"  
  2. options="Customer" selected-model="CId" checkboxes="true" style="display: inline; width: 252px;"></div>

Answers (1)