Enter Your Email Address to Watch This Lesson

Your link to unlock this lesson will be sent to this email address.

Unlock this lesson and all 972 of the free egghead.io lessons, plus get Angular 2 content delivered directly to your inbox!



Existing egghead members will not see this. Sign in.

Edit with live reloading using NativeScript livesync

1:13 Angular 2 lesson by

Learn how to use the livesync option to make quick changes to css and/or Angular components to see live updates in the emulators or on devices. Also learn how to run livesync simultaneously on iOS and Android.

Get the Code Now
click to level up

egghead.io comment guidelines

Avatar
egghead.io

Learn how to use the livesync option to make quick changes to css and/or Angular components to see live updates in the emulators or on devices. Also learn how to run livesync simultaneously on iOS and Android.

For a faster development experience, we can use TNS Livesync and then the platform you would like to live sync on. In this case, we'll use IOS.

We'll pass the dash dash emulator flag, and then dash dash watch, and we notice now, if we make a change and save, you'll see at LiveReload over here.

You can also run the same command against android and that will run against any android emulator you have running. We can see that now live reload on android.

In addition to android and IOS specific options, you can omit the emulator flag, and that will actually run Livesync on any android connected devices and emulators at the same time. Same goes if you use IOS. That will run on any connected iPhone and if you have the emulator running.

You can also omit the platform name all together, and that will run Livesync on all connected devices and emulators. If you just wanted to run Livesync on the android and IOS emulators at the same time, you can use TNS Livesync with the emulator in watch flags.

Now when we make a change, we'll see them both update in the IOS emulator and in the android emulator, as well.

HEY, QUICK QUESTION!
Joel's Head
Why are we asking?