{"action":"created","issue":{"url":"https://api.github.com/repos/Famous/framework/issues/70","labels_url":"https://api.github.com/repos/Famous/framework/issues/70/labels{/name}","comments_url":"https://api.github.com/repos/Famous/framework/issues/70/comments","events_url":"https://api.github.com/repos/Famous/framework/issues/70/events","html_url":"https://github.com/Famous/framework/issues/70","id":97535597,"number":70,"title":"nested $repeats and $index values","user":{"login":"Joera","id":5507865,"avatar_url":"https://avatars.githubusercontent.com/u/5507865?v=3","gravatar_id":"","url":"https://api.github.com/users/Joera","html_url":"https://github.com/Joera","followers_url":"https://api.github.com/users/Joera/followers","following_url":"https://api.github.com/users/Joera/following{/other_user}","gists_url":"https://api.github.com/users/Joera/gists{/gist_id}","starred_url":"https://api.github.com/users/Joera/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Joera/subscriptions","organizations_url":"https://api.github.com/users/Joera/orgs","repos_url":"https://api.github.com/users/Joera/repos","events_url":"https://api.github.com/users/Joera/events{/privacy}","received_events_url":"https://api.github.com/users/Joera/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-07-27T19:19:09Z","updated_at":"2015-08-08T09:44:42Z","closed_at":null,"body":"Question:  Who has an idea how i can get a parent $index value inside a child $repeat? \r\n\r\nas in a html structure like\r\n\r\n   \t<node class=\"cluster\"> //  first repeat - thinks rows\r\n    \t\t<node class=\"particle\"></node> // second repeat  -- think columns \r\n    \t</node>\r\n\r\nand .js \r\n\r\nbehaviors: {\r\n\r\n   .cluster': {\r\n\r\n            '$repeat': function(s_array) {\r\n                   var result = [];\r\n                   for (var i = 0; i < s_array.length; i++) { result.push({}); } \r\n                   return result;\r\n            },\r\n            'position': function($index) \r\n                    return [ s_array[$index][1], ];  \r\n            },\r\n  },\r\n  '.particle': {\r\n\r\n            '$repeat': function(s_array) {\r\n                var result = [];\r\n                for (var i = 0; i < s_array[PARENTINDEX][2]; i++) { result.push({}); } \r\n                return result;\r\n            },\r\n            'position': function() {\r\n                    return [$index, 0];      \r\n            },\r\n   },\r\n\r\nstates: {\r\n\r\n      s_array : [[1,11,8],[2,9,13],[2,9,23],[3,7,13],[4,6,19],[5,5,19],[6,4,8],[6,19,5],[7,4,7],[7,21,2],[8,4,6]]  \r\n\r\n }"},"comment":{"url":"https://api.github.com/repos/Famous/framework/issues/comments/128944645","html_url":"https://github.com/Famous/framework/issues/70#issuecomment-128944645","issue_url":"https://api.github.com/repos/Famous/framework/issues/70","id":128944645,"user":{"login":"Joera","id":5507865,"avatar_url":"https://avatars.githubusercontent.com/u/5507865?v=3","gravatar_id":"","url":"https://api.github.com/users/Joera","html_url":"https://github.com/Joera","followers_url":"https://api.github.com/users/Joera/followers","following_url":"https://api.github.com/users/Joera/following{/other_user}","gists_url":"https://api.github.com/users/Joera/gists{/gist_id}","starred_url":"https://api.github.com/users/Joera/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Joera/subscriptions","organizations_url":"https://api.github.com/users/Joera/orgs","repos_url":"https://api.github.com/users/Joera/repos","events_url":"https://api.github.com/users/Joera/events{/privacy}","received_events_url":"https://api.github.com/users/Joera/received_events","type":"User","site_admin":false},"created_at":"2015-08-08T09:44:42Z","updated_at":"2015-08-08T09:44:42Z","body":"Ah .. nesting components ..Thanks. I will give it a try. "}}