Getting Started with Ionic

ionic
html
javascript

#1

Ionic is an open source front-end framework for developing hybrid mobile apps with HTML5.

Create a Ionic app as follows:

  1. Create a new workspace (Node.js or Custom for a clean workspace)
  2. Open a Terminal, or use the pre-existing one at the bottom
  3. Run the following commands in the Terminal:
$ npm install -g cordova ionic
$ ionic start myApp sidemenu
$ cd myApp
$ ionic serve -p $PORT --nolivereload

3 If you are asked which address to serve the app on. Chose 1 for the numbered IP address (don’t choose localhost).
4. Click the “Preview” button in the top menu in the IDE, and choose “Preview Running Application”. This will open the Preview window for your running app.


Tutorials - Table of Contents
#2

Awesome getting started steps. However, I’m getting “No Application Running Here” when I do the Preview > Preview Running Application. Everything else appears to be working properly.


#3

Oh oh oh!
I was actually typing in the IP address instead of just leaving it $PORT. Now it’s working!


#4

A post was merged into an existing topic: Ionic Phone App - IOS and Android emulators for testing


#5

This doesn’t seem to be working for me. I’ve tried running ionic serve -p $PORT --nolivereload, ionic serve -p $PORT -r 8081, as well as both of those, plus the -l and -a $IP attributes.
Each time it has launched the server on localhost. When i open the browser (Preview Running Application), it gives me a Cloud9 url, which doesn’t load. Adding the port number to the url, and/or adding /ionic-lab, don’t work. The page doesn’t load with the localhost url either. What should I do?

I’m not sure if I should create a new topic for this or not, but decided that my question would probably fit into this thread, so I’m sorry if I’m reviving a dead thread :confused:


#6

Try forcing the address as 0.0.0.0; ionic serve -p $PORT --nolivereload --address $IP should work. This may show an error regarding xdg-open but it shouldn’t affect the preview.