Problème avec $

please help me I use ionic and I would send my registration data base but still jai jai fai this message with the screenshot.
view my code

XMLHttpRequest cannot load http://localhost/docteur/saveJoke.php. Response to preflight request doesn’t pass access control check: No ‘Access-Control-Allow-Origin’ header is present on the requested resource. Origin ‘http://localhost:8100’ is therefore not allowed access.




ok! cpoy/past this code in your API .htaccess

<IfModule mod_headers.c>
         Header set Access-Control-Allow-Origin "*"
         Header set Access-Control-Allow-Headers "Content-type"