Twitter: raymondcamden


Address: Lafayette, LA, USA

Ionic 1.2.0 Released

09-04-2014 2,259 views Mobile, JavaScript, HTML5 1 Comment

Yesterday the Ionic folks released version 1.2.0. They've got a nice blog entry taking about the update, but I want to share the cool bits here as well. Definitely read their blog post for all the updates, but here are the ones that I think are really cool.

First and foremost is the new LiveReload feature. Previously Ionic supported automatic reloading in the browser via ionic serve. You type - you save - and the browser reloads. Cool. But now you can do this on an actual emulator - or device. That's right. You skip the whole part of rebuilding to the emulator. Admittedly that saves you just 30 seconds - but as soon as you start using this feature you really, really appreciate it. One caveat - it requires a device/os that supports web sockets so you can't test this with older Androids/iOS versions. Here is an incredibly short video showing this in action.

The other cool feature is support for console logs in terminal. Now - I typically use GapDebug for everything lately, but sometimes if I just need a quick view of logs, I like having the option to see it show up in the terminal as well. I blogged about using tail -f on the console log the Cordova CLI creates, and that's also an option, but again, this is even simpler. Just pass a flag to the Ionic CLI and it will show up directly in the Terminal:

Note that currently console.dir doesn't work. I mentioned this to one of the Ionic creators and he mentioned it would be added later. In the meantime, don't forget you can simply console.log(JSON.stringify(something)) as well.

Anyway, there's more to 1.2.0 (including CodePen support), so definitely upgrade. What's nice is that the CLI will actually tell you that an update is available so it is nice and obvious.

1 Comment

  • Commented on 09-05-2014 at 6:08 AM
    I wanted to share a small issue I ran into with LiveReload. In my app, I've got a condition when if you are offline, you are sent to /offline and that is it - you can't do anymore. To test, I modified my offline check to ALWAYS be true. I confirmed I got the nice error, and carried on.

    But then I noticed something. As I edited code, the view never changed. I then realized what was happening. LiveReload was reloading the app at /offline. I was "stuck" there URL wise and since it was an app, I couldn't fix it by hand.

    imo, it should really LiveReload back to the beginning of the app. I filed a bug for this here: https://github.com/driftyco/ionic/issues/2144

Post Reply

Please refrain from posting large blocks of code as a comment. Use Pastebin or Gists instead. Text wrapped in asterisks (*) will be bold and text wrapped in underscores (_) will be italicized.

Leave this field empty