How do I set ionic serve to use Chrome as the default browser?

Viewed 26316

I want to run ionic serve with Google Chrome.

I've tried:

ionic serve --browser chrome
ionic serve --browser google-chrome

But that doesn't work. I can get it to use firefox if I type:

ionic serve --browser firefox

How do I set the default browser for ionic serve to Chrome?

11 Answers
cordova run browser -- --port=8001 --target=Firefox

OR

cordova run browser --target=Firefox

OR

cordova run browser  --target=Chrome

OR

cordova run browser -- --port=8001 --target=Chrome

Thanks

ionic serve -w chrome this works for me and successfully launch my app on chrome

For Ionic 3 and mac you need to type like this: ionic serve -w "Google Chrome"

The following will work in Windows when anyone face issue in ionic serve -f chrome:

ionic serve --browser "chrome"

And this works on my Mac:

ionic serve --browser "google chrome"

you can try with these commands when you fire up your app

ionic serve --browser "google chrome"

ionic serve --browser "safari"

ionic serve --browser "firefox"
Related