Can someone please help me troubleshoot this code? I've tried adding .topromise() and using a then, but it's not solving the issue.
getWebErrors(): ng.IPromise<Array<IWebErrors>> {
var defer = this.q.defer();
this.http({
url: `/api/v1/admin/GetWebErrors`,
method: "GET"
})
.success((response: IQuote) => {
defer.resolve(response);
})
.catch(reason => {
defer.reject();
});
return defer.promise;
}