On your desktop Chrome browser, navigate to chrome://inspect. If you're running the app on Android, you can attach the Chrome Developer Tools to the app and see the error in the Console.įirst, connect your device with a USB cable to your computer. This is what the command looks like if you want to run it for iOS:Īnd now you can see the error, I am injecting a dependency called bla, that does not exist! For live reload to work, the dev machine and device must be on the same local network, and the device must support web sockets. So, when you're changing the code, the app will be instantly updated on the device.Īny changes to plugins will still require a full rebuild. The Live Reload option is similar to when you're using ionic serve for testing your app on the desktop browser. However, you can only use -consolelogs if you also use -livereload. You can use the ionic run and ionic emulate commands with the -consolelogs option to output the console messages to the terminal/command prompt window. Let's have a look at 2 different ways to figure out what's wrong. I used the project from my How To Create A Different Tab Layout Per Platform In Ionic tutorial and broke something in the JavaScript code. Unfortunately, it's not so easy to see straight away what is causing the error, since you don't have a console on the mobile device, This causes the code to break while Angular is initialising the app and it ends up not being able to display the template for the first view, so the screen just displays an empty page. In my experience, this is usually caused by missing JavaScript files. I probably don't need to explain the dreaded White Screen Of Death, but just in case you haven't seen it yet: it's when your Ionic app is working fine in your desktop browser and then you deploy it to a device/emulator and it doesn't work! All you see is a white screen when you open the app.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |