I have coded a button like this:
<ion-radio ng-repeat="business in multipleBusiness track by business.id" ng-model="choice.value" ng-value="business">{{business.name}}</ion-radio>
And in the controller, my logic is...
$scope.choice.value = localStorageService.get('defaultBusiness') || $scope.multipleBusiness[0];
When the value passed to $scope.choce.value
matches $scope.multipleBusiness[0]
, the radio buttons display with a checkmark. However, if the value from localStorage is used—via
localStorageService.get('defaultBusiness')
—the checkmark does not appear.
Even though both values are objects with id and name keys when checked through console log.