I have a AngularJS service in Typescript that makes a get https call returns some data.
My results is a child object of the response.data as follows response.data.Result.
How do I get access to it? I cannot do response.data.Result as I get compile time error where the response.data defined under IHttpPromiseCallbackArg<T> does not have the result property.
class ApplicationService implements IApplicationService {
private webApiUrl;
static $inject = ['$http'];
constructor(private $http: ng.IHttpService) {
this.webApiUrl = 'http://localhost';
this.$http = $http;
}
getApplications(): ng.IPromise<IApplication[]> {
return this.$http.get(this.webApiUrl + '/api/applications')
.then((response: ng.IHttpPromiseCallbackArg<IApplication[]>): IApplication[]=> {
return <IApplication[]>response.data;
});
}
}
response. What does it show?