I keep encountering a TypeError: this.$resource is not a function. Below is the code snippet causing the issue:
export class DataAccessService
implements IDataAccessService {
static $inject = ["$resource"];
constructor(private $resource: ng.resource.IResourceService) {
}
getTravelExpenseType(): ng.resource.IResourceClass<T> {
return this.$resource('URL:id', {}, {});
}
}
common.service("dataAccessService",
[DataAccessService]);