$ mkdir hello-world
$ cd hello-world
$ tns create hello-world --ng
$ tns platform add android #You can only add ios on an OSX machine
Then ensure you have a device connected or an emulator running (if you don't, the default emulator should start or an error will be raised. I would recommend genymotion for android).
$ tns run android
If you want to use the default android emulator, add the --emulator
flag.
As of tns 2.5 livesync is now the default action for tns run <platform>
, which will automatically re-compile when you save file changes. This can dramatically improve your development time, however, if you make changes to your plugins, you will need to recompile properly.