I have an ngRepeat that populates a list of customers, shown here :
<div ng-repeat="terr in terrData.data">
<div class="customer-row" ng-click="clickCustomerSelect(terr)">
<input class="customer-radio" type="radio" name="customer-select" ng-model="selectedCustomerRow" value="{{terr.customerID}}">
<div class="contact-data-column">{{terr.custNm}}</div>
<div class="primaryphone-data-column">{{terr.primaryPhone}}</div>
<!-- other customer data -->
</div>
</div>
There is a click event on the customer-row div that says if the row is clicked, the radio button for the row should be checked.
The basic controller logic shown here :
$scope.clickCustomerSelect = function(customer){
$scope.selectedCustomerRow = customer.customerID.toString();
//Other business logic
};
I see that whenever the customer row is clicked (not the radio button), the model gets properly updated, and the radio button corresponding to that value is checked. Note that this is expected functionality.
The issue i'm seeing is that if you check the radio button manually (i.e. not clicking the row), the model will no longer respond to updates from clicking the row.
I'm wondering if somehow once you select the radio button you're going outside of angular scope?
EDIT: Sample model
terrData.data = [{
"customerID": 1,
"companyName": "Name 1",
"custNm": "Blank",
"primaryPhone": "111-111-1111"
}, {
"customerID": 2,
"companyName": "Name 2",
"custNm": "Blank",
"primaryPhone": "111-111-1112"
}, {
"customerID": 3,
"companyName": "Name 3",
"primaryPhone": "111-111-1113"
}];