@sauravo14 wrote:
When trying to include an angular expression within ng-repeat, I am getting an Error. I'm being able to use {{val}} which is being passed by state.params outside the ng-repeat, but not inside it.
.factory('Chats', function($http) { var data = $http.get('https://oom-hgt.firebaseio.com/.json'); return { oom1: function() { return data; } }; .controller('OOM', function($scope, $state, Chats) { Chats.oom1().then(function successCallback(response) { $scope.oom = response.data, }); $scope.val = $state.params.val; }); <ion-list ng-repeat = "(key,val) in oom"> <ion-item href="#/app/a1/{{key}}"> <div>{{key}} </div> </div> </ion-item> </ion-list> <ion-item ng-show='item.NAME.length > 0' ng-repeat="item in oom.{{val}}"> <span> <div class="row"> <div class="col">{{item.RANK}} </div> <div class="col col-75">{{item.NAME}} </div> <div class="col">{{item.PLAYED}} </div> <div class="col">{{item.POINTS}} </div> </div> </span> </ion-item>
Posts: 1
Participants: 1