|
Erstellt von James Drummond
vor mehr als 9 Jahre
|
|
See http://ccoenraets.github.io/ionic-tutorial/build-ionic-project.htmlSet up and build are roughly the same as Cordova but:You need to launch ionic seperately: ionic serve (If you are accessing an api locally you'll need the node server running separately i.e. with 'node server')*** If your app needs to access the localhost - i.e. for an API - then it will have to do so via the network. The (node) API server will be on http://10.0.2.2:5000/Debugging from a remote Android deviceSee https://developer.chrome.com/devtools/docs/remote-debuggingAttach the device and run chrome://inspect (you will probably need to run 'adb devices' before) . You should see attached devices listed. Click on 'inspect' for the remote device, this will launch developer tools, you will be able to use developer tools as normal to debug.Hover over an element in dev tools to highlight that element on the deviceACCESSING LOCALHOST FROM THE DEVICEYou need to set up port forwarding. chrome://inspect in chrome. Check the port forwarding checkbox at the top, you want the ports on the device and localhost to match. So if node is listening on localhost:5000 then you want to enter port 5000 on the android device. This will allow you to see everything that's happening on the device.
Möchten Sie kostenlos Ihre eigenen Notizen mit GoConqr erstellen? Mehr erfahren.