Does anyone have any insight why $http does not make request to the server
if called from inside Kendo detailInit() method?
It does return a promise, but then never fires a request.
I first encountered this behavior using Restangular to fetch a subgrid data
in Kendo. Hence using detailInit.
BTW Restangular works very well across my expansive application.
Then I drilled it in down to $http.
The workaround with jquery works:
$scope.detailInit = function(e) {
$.ajax({
url: '/api/prs/' + e.data.id + '/fs'
}).done(function (data) {
$("<div/>").appendTo(e.detailCell).kendoGrid(
{ dataSource: data.data, columns: $scope.detailColumns
}
);
});
};
But I don't want to mix the methods of communicating with the server, which
is currently done via services using Restangular.
This is the test code, which does not work inside detailInit in place of
$ajax:
$http({method: 'GET', url: '/api/prs/' + e.data.id + '/fs' }).
success(function(data, status, headers, config) {
$("<div/>").appendTo(e.detailCell).kendoGrid(
{ dataSource: data.data, columns: $scope.detailColumns
}
);
}).
error(function(data, status, headers, config) {
Msgs.addDataLoadErr(data.data, "fss data");
});
Thanks!
-pavel
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.