How do I run my ionic application within the browser where I can select the 3 different devices?
run the following command in commandline or terminal from within your project folder:
ionic serve -l
Start a local dev server for app dev/testing
Project folder > run cmd
then put and run
ionic serve
after you can see your
Development server running!
Local: http://localhost:8100
External: http://192.168.1.xx:8100
DevApp: example#8100 on DESKTOP-pc
you can run it any devises using following address
External: http://192.168.1.xx:8100
Related
I used to run ionic serve and DevApp would find it on my network. Don't know what I did, but this is not working anymore, when I launch ionic serve I have this message:
[INFO] Development server running!
Local: http://localhost:8100
External: http://192.168.1.67:8100
Use Ctrl+C to quit this process
When I used to have:
Development server running!
Local: http://localhost:8100
External:
DevApp: demoxv#8100 on PC2
Can someone explain why?
Thanks
Ok I got what I changed, I used to run server with my IDE that did the correct command which is:
ionic serve --devapp
That's the command stated in Android DevApp. But in the official Ionic documentation:
Ionic Documentation: devapp
The command is said to be ionic serve without --devapp.
It's quite late, but for anybody in future it can help.
As I wrote here - changing network profile from private to public helped me.
Even if my answer didn't help, the whole topic can be useful.
I'm new in Ionic and using Ionic 3.9.2
I got several terminal commands to serve my ionic-app but, I'm not getting any difference between these two commands.
ionic serve
and
ionic serve -c
This is basically short form of ionic serve --consolelogs for printing the log of you app in ionic CLI.(see the image)
There is second command to debug the app which is ionic serve --verbose
Hope this helps you to find out the difference.
ionic serve -c
or
ionic serve --consolelogs
will Print app console logs to your Ionic CLI.
Hope this helps
ionic serve -c will print console logs. If you have a mobile device connected on same wifi, then you can also view your app on the device as well using the ionDevApp .
To run in basic mode use
ionic serve
To run with console log in CLI
ionic serve -c
To run with livereload with console log in CLI
ionic serve -lc
To run with liverelaod in CLI
ionic serve -l
To run in android with livereload with console log in CLI
ionic run android -lc
To run in iOS with livereload with console log in CLI
ionic run ios -lc
Hope it helps
Iam trying to run the ionic app in my device for logging errors . I am using the following command
ionic cordova run android -l -c -s --debug
The app is installing in my device but its showing ERR_CONNECTION_REFUSED and the application is closing.
Can some one give solution to this issue ? Thanks
For Livereload the phone and the development machine (dm) have to be on the same network and the mentioned Port has to be reachable (no Firewall on dm, etc.)
Your phone Shows 4g as Network. Ist has to be in your wifi
I am facing a problem in ionic to start a new ionic project or serve ionic project while Internet connection in on.
In Command Prompt no error come but CLI break after a few seconds. But without an Internet connection it works perfectly, mean without an Internet connection I can serve the ionic project (ionic serve). But to start a new project we have to connect our laptop to the Internet connection and with the connection, I have this problem. I have reinstalled the ionic but still, I'm facing this problem.
This is the image of process of ionic serve with Internet connection
Problem Solved!
first we have to uninstall ionic
npm uninstall -g ionic cordova
still ionic has not completely uninstalled. To do the same we have to delete all ionic files in our windows drive (Local Disk :c).
then we have to uninstall nodejs from control panel.
still node and npm has not uninstalled completely so we also have to delete all node and npm files from c drive.
now install nodejs recommended and the ionic
npm install -g ionic cordova
It will work now....
The server doesn't start up. You should get a lot more processes showing after the
webpack started ...
like sass, postprocess, lint, build etc.
To find out the possible error you can use the verbose switch which may help show what the error is.
$ ionic serve --verbose
Please try that and see what the output is.
I am building a hybrid app using ionic 3 .While I try to run it in browser it gives me a "Missing Command Error".It runs on android and ios though.But i wanted to test it on browser too.
Testing your app in a browser is as simple as running the serve command in your project's root folder.
ionic serve
if you want to run in the ionic lab then run command.
ionic serve -l