How to avoid "Aaccess-Controller-Allow-Origin" when I test my code in bowser?

When I use $http in my app,it can’t work in a bowser.
When i run it on android ,it is ok.And the “ionic run” often cast 35s.
The cli “ionic serve” is faster than run on device.
So, is there any way to fix this trouble?

If you’re using Chrome, there is an extension to bypass it: https://chrome.google.com/webstore/detail/allow-control-allow-origi/nlfbmbojpeacfghkpbjhddihlkkiljbi?hl=en

1 Like

@brandyshea
It works.Thanks.
It is a useful plugin.

1 Like