3

In my ionic app, I had to install some cordova plugins, due to which ionic serve does not work any more. After searching on web I found I need to work with:

ionic cordova run browser

Now if I make changes then I need to close the cli, open it and need to run the command again. Ctrl + F5 , clearing cache or refreshing browser nothing takes effect of the changes.

Every time I do a little update I have to run this command to see the update. Is there a way I can work faster?

halfer
  • 19,824
  • 17
  • 99
  • 186
user2828442
  • 2,415
  • 7
  • 57
  • 105

1 Answers1

2

The ionic cordova run command has a livereload option which

Spin up server to live-reload www files

Do:

ionic cordova run browser -l
Suraj Rao
  • 29,388
  • 11
  • 94
  • 103
  • it runs on localhost:8100 , when i try to login its says uncaught error, cordova not available , but on localhost:8100/index.html it works fine but does not get refresh :( , Please advise – user2828442 Dec 02 '17 at 08:30
  • for which plugin does it say cordova not available? does it show when you run the command without livereload? – Suraj Rao Dec 02 '17 at 08:40
  • It shows when I run with - l, if I run this without - l then it works fine – user2828442 Dec 02 '17 at 08:50
  • https://github.com/ionic-team/ionic-cli/issues/2306 https://github.com/ionic-team/ionic-cli/issues/2719 there seem to be some issues with livereload..and also there is https://github.com/ionic-team/ionic-cli/issues/2312 – Suraj Rao Dec 02 '17 at 09:07
  • this can save developers time – saber tabatabaee yazdi Mar 09 '20 at 14:53