Into a first loop, which i recover an id, i try to define other loop like this :
<ul ng-show="feed{{raterie.idFB}} === true" ng-init="var myFeed = myFeedFunction(raterie.idFB);">
<li ng-repeat="feed in getFeeder(raterie.idFB) | limitTo:1">adoptions are : {{feed.title | cleanit}}</li>
<li ng-repeat="feed in feeder{{raterie.idFB}} | limitTo:1">adoptions are : {{feed.title | cleanit}}</li>
<li ng-repeat="feed in feeder{raterie.idFB} | limitTo:1">adoptions are : {{feed.title | cleanit}}</li>
<li ng-repeat="feed in feeder[raterie.idFB] | limitTo:1">adoptions are : {{feed.title | cleanit}}</li>
<li ng-repeat="feed in feeder['raterie.idFB'] | limitTo:1">adoptions are : {{feed.title | cleanit}}</li>
<li ng-repeat="feed in myFeed | limitTo:1">adoptions are : {{feed.title | cleanit}}</li>
<li ng-repeat="feed in feeder846097918756247 | limitTo:1">adoptions is : {{feed.title | cleanit}}</li>
<ul>
I don't understand how to make 'feeder846097918756247' automatically constructed. The last li is what i want to get, i put it manually with only one example into first loop
I try two solutions into $scope :
// define the value for ng-repeat (1st solution)
$scope.getFeeder = function(id) {
var idr = 'feeder' + id;
return idr;
}
// define the value for ng-repeat (2nd solution)
function myFeedFunction(pId) {
return eval('feeder' + pId) ;
}
It's doesn't work.
My online app is here : http://www.monde-du-rat.fr/pmr/
return $scope[idr]what happens?