Running a Ionic 2 application

ionic

#1

Hi, any ideas on how to run a Ionic 2 application?


#2

Just create a Node.js workspace, install ionic and have fun.

Note that C9 allows to use only these ports: 8080, 8081, 8082. So, to make your app served in your browser and benefit of live reload, use this command to launch you app:

$ ionic serve -p $PORT -r 8081

The -p parameter followed by env variable $PORT tells ionic to run on port 8080 (this is the value of $PORT); the -r parameter followed by 8081 (or 8082 if you like) overrides the default live reload port (35729).

I am using ionic 2 it and everything is fine.


#3

Hey I’ve got a related question

Let’s say you want to connect a device to run the ionic emulator from your Cloud9 ionic app or you want to run the Phonegap Developer app from your Cloud9 instance, anyone know any way of doing this?

At the moment, anyone running an Ionic app on Cloud9 will start to struggle when their testing needs to includes any functionality from the Cordova device plugins.

Any thoughts welcome.

Tom


#4

In my case (ionic with Meteor - Angular2), it was:
ionic serve -a $IP -p $PORT -r 8081


#5

Hey @tomgallagher did you get to a solution to this?


#6

Nothing satisfactory, no. I found the only way to test on a real device was to build with Ionic Package and then load the built app onto an Android device, then using Chrome to debug on the device.