Help. Application works in livereload mode but it doesn't work in normal run mode


#1

I have a strange problem with my app. It works perfect using the livereload mode ‘ionic run android -l -c’, the problem comes when I try to execute on run mode ‘ioni run android’.

The problem is that in run mode the app cannot load the template, I can see the index.html file but the template cannot be loaded.

How can I see whats happens?

[SOLVED]
The error was that I have got the path to templates beginning with slash so the paths are not relative to the app directory. I have to change “/template/foo.html” to “template/foo.html”.


#2

In Chrome, enter the following url in your address bar:

chrome://inspect/#devices

If you have installed the correct drivers you should see your device here. Hit “Inspect” and you should be able to debug.


#3

Ok. Thanks. I did it with “ionic run android”. I got this message:

Failed to load resource: net::ERR_FILE_NOT_FOUND
file:///templates/login.html

The point is that “ionic serve” and “ionic run android -l” works without problem.