Failed to load http://localhost/api/index.php: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8100' is therefore not allowed access. core.js:1673 ERROR HttpErrorResponse {headers: HttpHeaders, status

I need to display the title from the database to the ionic home page. but my console showing the below error

Also changed ionic.config.json file like this
“name”: “proxy-example”,
“integrations”: {},
“proxies”: [
“path”: “/api”,
“proxyUrl”: “http://localhost/test_ionic/api/index.php

you dont need to do any change in code just add this extension in your chrome and enable it