I'm developing an app in Ionic using Cordova. I want to start the serve task ionic cordova run browser and not have a new tab open up everytime. Ideally I would already have http://localhost:8000/index.html opened and would like to reload it.
- Why would you want to run it without having it open up in a new tab/window?Kody R.– Kody R.2019-01-23 20:14:55 +00:00Commented Jan 23, 2019 at 20:14
- 1Because I always have the tab open and I just want to refresh it.Gaby Garro– Gaby Garro2019-01-23 22:18:46 +00:00Commented Jan 23, 2019 at 22:18
Add a comment |
1 Answer
That's just part of the command cordova run browser. You'll probably want to use live-reloading for the browser and then you'll use the command cordova run -- --live-reload.
Personally for me, I just use Python's python3 -m http.server to serve up my www folder, go to my IP address in my browser (port 8000 is where it will put it), and just refresh the page whenever I need to update. You can download python here.
1 Comment
Gaby Garro
My solution was creating a new Ionic 4 project and migrating the old code component by component. It serves with
ng serve now and it works as I'm used to. Plus I get all the advantages of upgrading.