I am trying to get a soap request with Angular 6 using the ngx-soap package. I have a service to handle the api like so:
import { Injectable } from '@angular/core';
@Injectable()
export class ApiService {
client: Client;
constructor(
private soap: NgxSoapService
) {
this.soap.createClient('assets/wsdl/auth/auth.wsdl').subscribe(client => this.client = client);
}
}
Although and even though this is the exact example on the package page I get the following error:
[ts] Property 'subscribe' does not exist on type 'Promise<Client>'.
I know I can use the then but shouldn't it be possible to subscribe using this package?