Im trying to bind value of radio button from ionic controller. The following is the code i have used for.
<div class="list">
<ion-radio ng-model="SearchChoice" ng-value="All" ng-click="SearchByFilter('All')"> ALL <div id="badge-all" class="count-jkt"> <span ng-bind="AllCount.OnGoing"></span></div></ion-radio>
<ion-radio ng-model="SearchChoice" ng-value="New" ng-click="SearchByFilter('New')"> NEW <div id="badge-new" class="count-jkt">{{AllCount.New}}</div></ion-radio>
</div>
and my controller is,
.controller('MainCtrl', function($scope) {
$scope.SearchChoice = "All";
$scope.SearchByFilter = function(item) {
console.log( "Filter:", item);
};
});
Here the value is not binding properly. Kindly help me guys!