While Testing my app on a device I always get this error
CORS enable at your server-side Have also tried all the solutions available here none of this work.
Function Calling API
import { Injectable } from '@angular/core';
import { HttpClient, HttpHeaders } from '@angular/common/http';
import { environment } from '../../environments/environment';
@Injectable({
providedIn: 'root'
})
export class ApiService {
constructor(private http: HttpClient) { }
async checkPhone(phone: string, hash: string) {
console.log("value of phone inside checkPhone Function " + phone);
let data = { "phone": phone, "hash": hash };
let headers = new HttpHeaders({
'Content-Type': 'application/json'
});
let options = {
headers: headers
}
return await (this.http.post(environment.endpoint + "/users/register-phone", data, options)).toPromise();
}
}
Config.xml Access is allowed
<access origin="*" />
<allow-intent href="http://*/*" />
<allow-intent href="https://*/*" />
1 post - 1 participant