Hello, I have made an APP similar to the news but consuming a service created by me. Locally without executing it by means of a real device, the functions to the services are invoked correctly. But when I go to the real device I get the error:
In my PHP service I added the headers:
header ('Access-Control-Allow-Origin: *');
header (“Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept”);
header (‘Access-Control-Allow-Methods: GET, POST, PUT, DELETE’);
But follow the same error. Previously I gave that same error but with those headers it was solved … with the real device no.
From Angular I invoke import {HttpClient} from ‘@ angular / common / http’;
Thank you very much in advance!
Regards!