These are chat archives for mwaylabs/generator-m-ionic

3rd
Nov 2015
Gokul
@exp-gokul
Nov 03 2015 09:27
@landrysoules i am also having the same issue while integrating api's. where should i find ionic.project file so that i can add the proxies. Please help.
Jonathan Grupp
@gruppjo
Nov 03 2015 09:36
Hi @exp-gokul, @landrysoules. While developing, most of us usually use chrome with --disable-web-security enabled http://stackoverflow.com/questions/3102819/disable-same-origin-policy-in-chrome. That's the easiest way to do it without having to set up a proxy.
Landry Soules
@landrysoules
Nov 03 2015 10:54
Thanks a lot @gruppjo . It does make sense indeed :smile:
Jonathan Grupp
@gruppjo
Nov 03 2015 10:55
:) Although using a proxy is a little sophisticated. Thanks for bringing it up. Maybe we'll include one in the future.
Mathias Maier
@MathiasTim
Nov 03 2015 10:57
Hey, @exp-gokul, @landrysoules. but please be careful with --disable-web-security enabled, use a different browser for dev than surfing.
Landry Soules
@landrysoules
Nov 03 2015 10:58
Keep up the good work : I've tried many grunt/gulp tools for building ionic projects and yours is by far the best I've found!
Gokul
@exp-gokul
Nov 03 2015 11:45
Hi @MathiasTim , @gruppjo , @landrysoules i am able to get ride of CORS.
I have run ionic serve which creates a ionic.project and then i have added ,
"proxies": [
{
"path": "/v1",
"proxyUrl": "api url"
}
],
Then added this path in app/main/constants/env-dev.json as
{
"SERVER_URL": "v1/"
}
Then run the gulp watch-build which will create the files in www/
Then ionic serve will resolve the isue
issue
Jonathan Grupp
@gruppjo
Nov 03 2015 11:47
Hi @exp-gokul. Are you using both the Ionic CLI and Generator-M-Ionic?
Landry Soules
@landrysoules
Nov 03 2015 11:55
Hi @exp-gokul, thanks for the tip. Doesn't using ionic serve actually remove the benefits of gulp watch/browsersync ?