Link to home
Start Free TrialLog in
Avatar of ocean O
ocean OFlag for United States of America

asked on

httpClient doesn't exist in angular

Hi, I have a question regarding angular httpClient.

I have some code below, it throws an error for me: 

Property 'httpClient' does not exist on type 'DocService'.ts


 createObservable(JsonUrl): Observable<any[]> {

    return this.httpClient.get<any[]>(this.baseBatchURL + "getResults", {

      params: JsonUrl,

    });

}


 getValidationData(): Observable<any> {

        return this.createObservable(JsonUrl);

    }

JsonUrl is passing a json file.


Any inputs are welcome.Thanks

ASKER CERTIFIED SOLUTION
Avatar of Zolf
Zolf
Flag of United Arab Emirates image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ocean O

ASKER

Thank you.

Glad to help!!