Kerry Ritter
Kerry Ritter

Reputation: 1187

Ionic Framework app works with "ionic serve" but not in Ionic View app

I have a very small Ionic app I've been working on (just a couple angular routes/views). When I run it using "ionic serve", the app loads in my browser as expected. However, when I upload it using "ionic upload" and view it in the Ionic View app, it appears as though none of my javascript works, or my routes are not working.

How can I debug this issue? Are there build tools to detect errors or anything along those lines?

Upvotes: 1

Views: 1808

Answers (2)

Korney Vasilchenko
Korney Vasilchenko

Reputation: 3

I had the same issue recently. The problem was that I stored my Ionic views NOT in /templates folder.

Please, check, maybe my answer will be useful for you.

Upvotes: 0

cortexlock
cortexlock

Reputation: 1476

As @Keval says if you're running Android you can debug on-the-fly using Chrome

  1. enable Developer options on your device (Settings > About, then find Build number and keep tapping it...yes really!)
  2. In Developer options, enable USB debugging checkbox
  3. plug in with a USB cable
  4. run your app on the device.
  5. At some point your device will then show a popup requiring you to accept debug commands from the remote computer, click Accept. If it doesn't appear the first time, unplug and replug usually fixes it
  6. head to chrome://inspect in desktop Chrome, and click inspect under your device
  7. A new Chrome window will open with all the juicy abilities you need - inspect code, set breakpoints, look at network speeds, access the console and so on

You can also do this on iOS via Safari http://developer.telerik.com/featured/a-concise-guide-to-remote-debugging-on-ios-android-and-windows-phone/

Upvotes: 5

Related Questions