Angularjs, get ionic radio button value for ng-show? -


i'm working ionic framework , i'm stuck problem. have display views (in case label "wifi" , "lan") when related buttons pressed.

<ion-content ...> <ion-radio ng-repeat="item in reti" ng-value="item.value" ng-click="networkchange(item)">    {{item.text}} </ion-radio>  <ion-item ng-show="item.value == 'wifi'">wi-fi</ion-item>  <ion-item ng-show="item.value == 'lan'">lan</ion-item> 

my .js file

.controller('connessionectrl', function($scope) { $scope.reti = [     { text: "wi-fi", value: "wifi" },     { text: "lan", value: "lan" } ];  $scope.data = {     data: "wifi" };  $scope.networkchange = function (item) {     console.log("selected network: ", item.value);     }; }; 

my problem ng-show, possibly item.value passed, not working (not showing wi-fi or lan. suggestions? help

i suggest following:

<ion-item ng-show="data == 'wifi'">wi-fi</ion-item>  <ion-item ng-show="data == 'lan'">lan</ion-item> 

and

$scope.data = ""; $scope.networkchange = function (item) {     console.log("selected network: ", item.value);     $scope.data = item.value; }; 

Comments