Вы пропустили оператор function return
return $http.get('src/temp/chit-fund-data.json')
Итак, код становится:
function chitFundCtrl($scope, $http, element) {
return $http.get('src/temp/chit-fund-data.json')
.success(function (data) {
$scope.Details = data;
})
.error(function (data, status, headers, config) {
// log error
});
setTimeout(function () {
$(element).find('md-radio-group').slick({
infinite: true,
slidesToShow: 5,
slidesToScroll: 5,
arrows: true,
});
}, 0);
}
пс: теперь вы можете использовать then
и catch
вместо success
return $http.get('src/temp/chit-fund-data.json')
.then(function (data) {
$scope.Details = data;
})
.catch(function (data, status, headers, config) {
// log error
});