Angular https ionic ios issue Failed to load resource: The certificate for this server is invalid

HTTP calls are working in ionic ios with angular HTTP, HTTPS calls were showing error like this
Failed to load resource: The certificate for this server is invalid. You might be connecting to a server that is pretending to be “xxxxxxxxxx.com” which could put your confidential information at risk

and also check the following error
Failed to load resource: An SSL error has occurred and a secure connection to the server cannot be made.

apiService.ts file

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

constructor(private httpIonic: HTTP) {}

getAllStates(){
    return this.httpIonic.get("https://example.com/states")
}

And I am calling from another ts page like

this.apiService.getAllStates().subscribe((data) => {
    this.allStates(data);
});

NOTE: when i ran in browser it working fine, problem with ios emulator and device.
Don’t suggest me ionic native HTTP plugin because the response from ionic native HTTP is different than angular HTTP.