Is it possible to use ng-href="{{userData}}" in chartkick for rails? What I want to do is something like:
<%= line_chart ng-href='{{userData}}' %>
When my angular app loads up, I call .run like this:
kpiApp.run(function($rootScope, $http){
$http.get('kpis/kpi_users_count.json').then(function (response) {
$rootScope.userData = response.data;
});
});
I can see it works because on my page {{userData}} renders the expected json, now I want to insert this as the data attribute as the chartkick documentation indicates:
<%= line_chart data, id: "users-chart", height: "500px" %>
Thanks for any advice.