{"action":"created","issue":{"url":"https://api.github.com/repos/jtblin/angular-chart.js/issues/183","labels_url":"https://api.github.com/repos/jtblin/angular-chart.js/issues/183/labels{/name}","comments_url":"https://api.github.com/repos/jtblin/angular-chart.js/issues/183/comments","events_url":"https://api.github.com/repos/jtblin/angular-chart.js/issues/183/events","html_url":"https://github.com/jtblin/angular-chart.js/issues/183","id":102213788,"number":183,"title":"Expression in data=\"\"","user":{"login":"idlyapp","id":2523054,"avatar_url":"https://avatars.githubusercontent.com/u/2523054?v=3","gravatar_id":"","url":"https://api.github.com/users/idlyapp","html_url":"https://github.com/idlyapp","followers_url":"https://api.github.com/users/idlyapp/followers","following_url":"https://api.github.com/users/idlyapp/following{/other_user}","gists_url":"https://api.github.com/users/idlyapp/gists{/gist_id}","starred_url":"https://api.github.com/users/idlyapp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/idlyapp/subscriptions","organizations_url":"https://api.github.com/users/idlyapp/orgs","repos_url":"https://api.github.com/users/idlyapp/repos","events_url":"https://api.github.com/users/idlyapp/events{/privacy}","received_events_url":"https://api.github.com/users/idlyapp/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/jtblin/angular-chart.js/labels/question","name":"question","color":"cc317c"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-08-20T19:17:47Z","updated_at":"2015-08-22T07:26:13Z","closed_at":"2015-08-22T06:58:54Z","body":"Hi I have tried using an expression inside the data attribute like this\r\n\r\n          <div ng-repeat=\"item in item\">\r\n            <canvas data=\"getTheData(item.value)\"></canvas>\r\n         </div>\r\n\r\n\r\nand in the controller\r\n\r\n    var getData = {\r\n        first: function(){ return angularFactory.getData() };\r\n        second: function(){ return angularFactory.getData() };\r\n    }\r\n\r\n\r\n    $scope.getTheData = function(value){\r\n      getData[value]().then(function(data){\r\n          console.log(data);\r\n        });\r\n    };\r\n\r\n\r\nthe problem is this is resulting in [$rootScope:infdig] with a log that never stops even though I just have one item in the \"item\" list.\r\n\r\nI might have gone about this completely wrong, so I would highly appreciate any other suggestion\r\nif there is any other way for me to fire of certain functions based on ng-repeat data."},"comment":{"url":"https://api.github.com/repos/jtblin/angular-chart.js/issues/comments/133648445","html_url":"https://github.com/jtblin/angular-chart.js/issues/183#issuecomment-133648445","issue_url":"https://api.github.com/repos/jtblin/angular-chart.js/issues/183","id":133648445,"user":{"login":"idlyapp","id":2523054,"avatar_url":"https://avatars.githubusercontent.com/u/2523054?v=3","gravatar_id":"","url":"https://api.github.com/users/idlyapp","html_url":"https://github.com/idlyapp","followers_url":"https://api.github.com/users/idlyapp/followers","following_url":"https://api.github.com/users/idlyapp/following{/other_user}","gists_url":"https://api.github.com/users/idlyapp/gists{/gist_id}","starred_url":"https://api.github.com/users/idlyapp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/idlyapp/subscriptions","organizations_url":"https://api.github.com/users/idlyapp/orgs","repos_url":"https://api.github.com/users/idlyapp/repos","events_url":"https://api.github.com/users/idlyapp/events{/privacy}","received_events_url":"https://api.github.com/users/idlyapp/received_events","type":"User","site_admin":false},"created_at":"2015-08-22T07:26:12Z","updated_at":"2015-08-22T07:26:12Z","body":"So to get the data using an expression, shouldnt be possible?\n\nlördag 22 augusti 2015 skrev Jerome Touffe-Blin <notifications@github.com>:\n\n> <canvas data=\"getTheData(item.value)\"></canvas> is not even related to\n> the directives in this library, seems more like a basic angular issue?\n>\n> —\n> Reply to this email directly or view it on GitHub\n> <https://github.com/jtblin/angular-chart.js/issues/183#issuecomment-133648385>\n> .\n>\n"}}