You must set the default value for the switch in the ionic structure. Follow this code: -
enter code here
<body ng-controller="MainCtrl">
<ion-content>
<div class="list">
<ion-radio ng-repeat="item in clientSideList" ng-value="item.value"
ng-model="data.clientSide"> {{ item.text }}
</ion-radio>
</div>
</ion-content>
</body>
.controller('MainCtrl', function($scope) {
$scope.clientSideList = [
{ text: "Backbone", value: "bb" },
{ text: "Angular", value: "ng" },
{ text: "Ember", value: "em" },
{ text: "Knockout", value: "ko" }
];
$scope.data = {
clientSide: 'ng'
};
});
source
share