Live reload does not work with Ionic serve team

According to the Ion Guide Chapter 4 of http://ionicframework.com/docs/guide/testing.html , the ion service will start the live reboot server, which it does in my case, but the reboot does not occur.

Are there any prerequisites for the job? How to say live update chrome extension?

E:\Ionic\myapp>ionic serve Running dev server: http://localhost:8100 Running live reload server: http://localhost:35729 
+5
source share
4 answers

Here is what worked for me:

  • stop ion service if you execute the q command
  • run: ionic address from the command line

After running this command, you will be asked to choose which address you want to use, it is localhost, and the second is your device IP address. Try using the IP address of your computer instead of the local one.

+7
source

Even I encountered a similar problem, the console used to display the file, but the browser did not automatically update. Later, I discovered a missing closing tag on my index.html page, which prevented ion injection below the script needed for a live reload.

  <script src="//localhost:35729/livereload.js?snipver=1"></script> 

Check for typos or other html problems on the index.html page and fix them. A live reboot should correctly follow it.

+2
source

In Ionic 2/3, I solved this problem by deleting the node_modules/ folder and the package-lock.json , then when starting the terminal: npm install --save

+1
source

In my case, I downloaded the application as follows:

 window.ionic.Platform.ready(function() { angular.bootstrap(document, ['myApp']); }); 

Then I changed it for this:

 <body ng-app="myApp" > <ion-nav-view></ion-nav-view> </body> 

And he works

0
source

Source: https://habr.com/ru/post/1200700/


All Articles