I have multiple browser windows usually and it's always not popping up on the one I want.
Can I disable the feature of ionic serve opening in a browser?
Old CLI: As @Claudiu mentioned ionic server -b will not start a browser.
New CLI: the new command is ionic serve --no-open.
If you want to start a browser but not the default one, you can use the -w option.
Eg if Chrome is your default browser, but you want ionic serve to use Firefox instead, you can do something like
ionic serve -w "path/to/firefox.exe" or just ionic serve -w firefox if Firefox is in the path.
More info on ionic serve options:
ionic serve --helpHello you can pass in the package.json in the :
"scripts": { "clean": "ionic-app-scripts clean", "build": "ionic-app-scripts build", "lint": "ionic-app-scripts lint", "ionic:build": "ionic-app-scripts build", "ionic:serve": "ionic-app-scripts serve" }
and pass in the ionic:serve. like this: "ionic:serve": "ionic-app-scripts serve --nobrowser"
and run in the terminal of your project the: npm run ionic:serve
"ionic:serve": "ionic serve --no-open" and npm run ionic:serve it beahves weirdly and loops the command over and over again.