Tushar
Tushar

Reputation: 2078

IE 11 giving "invalid calling object" when try to call HTTP get request

I am using Angular 5 and HttpClient to make HTTP requests. When I try call GET request in google chrome its working fine, but in IE 11 its giving error as "invalid calling object".

import { HttpClient } from '@angular/common/http';

 this.httpClient.get(url).subscribe(
  (response) => {
     console.log(response);
  },
  (err) => {
    console.log(err);
  }
)

Upvotes: 1

Views: 1285

Answers (1)

Tushar
Tushar

Reputation: 2078

In my index.html file, pace.min.js library was there and it was loading before Angular Zone. So it's giving error when trying to call any HTTP request. I removed this library from index.html file. It solves my problem.

Upvotes: 1

Related Questions