Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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?

like image 350
Gopinath Kaliappan Avatar asked Mar 09 '16 14:03

Gopinath Kaliappan


People also ask

How do I run an ionic app in Chrome?

Developer Options & USB Debugging are enabled by default in the Android emulator. Open the Chrome browser and navigate to the URL chrome://inspect/#devices . Your connected Android device should show up in the list of Remote Targets. On your device, open the Ionic app that you would like to debug using Chrome.

How do I make Chrome my default browser on Ubuntu?

On your Ubuntu desktop, click on the “Show Applications” icon, which should be located at the bottom-left corner of your screen, and select Settings. In the Settings menu, click on Details 🡪 Default Applications. In the Default Applications menu, navigate to the “Web” category and select Google Chrome.


2 Answers

On Mac, option -f chrome is not working, on ionic version 2.1.8

Use ionic serve --browser "google chrome"

It will set the default browser to Chrome.

like image 86
Antoine Beloeuvre Avatar answered Oct 14 '22 03:10

Antoine Beloeuvre


In ionic.project file add:

"defaultBrowser": ""

OR

"defaultBrowser": "chrome"

and try ionic serve

this is working..!

u can also try :

"defaultBrowser": "firefox"

this.. and this.. might be help..

like image 33
the_mahasagar Avatar answered Oct 14 '22 03:10

the_mahasagar