I'm getting json file from REST server using factory:
.factory('chartData', function($http){
return {
get: function() {
return $http.get('http://').then(function(result) {
return result.data;
});
}
}
})
Now how can i pass this to directive which i'm using to make chart? I suppose i would need to use controller?