Contact GeekHive

Developer Preview: Angular 2

May 5, 2015

Blog | Development | Developer Preview: Angular 2
Developer Preview: Angular 2

It was announced today that Angular version 2 has moved out of the “alpha” release phase and into Developer Preview.  This is big news for developers and anyone working with dev teams. At GeekHive, Angular.js has become a favorite tool.  Talk of model binding, Bootstrap UI, and declarative HTML is thrilling, but I’ve been hesitant to start new projects in Angular.js v 1.x because version 2 was so… so close.

Angular 2 is going to solve a lot of problems for Angular developers: it will be easier to write directives/components, there will be a “right” way to write services, and even the markup attributes help clean things up.  The reason all this matters is that developers can write cleaner, more bug-free code, faster and with less hassle.  Considering the gift that was Angular 1.x, that’s saying something.

Favorite features I’ve seen so far, in no particular order:

  1. ES6 (The newest version of JavaScript) support, out of the box.
  2. Tight integration with TypeScript to simplify writing compilable code.
  3. Differentiation in the markup:
    1. Square brackets [] signify expressions or properties.
    2. Parenthesis () signify event listeners.
    3. The pound/number/hash symbol is used as a reference- particularly handy for iteration.
    4. Asterisk can be used for flow-control directives like “for.”  Combined with the # sign, it would look like:*for=”#name in names”
  4. Scope isolation!
  5. Transclusion is being retired.
  6. Shadow DOM and performance improvements.
  7. Data-binding can be once, one-way, or two way; this can contribute to performance and clarity of code.

The Angular team is taking a big leap with this new framework, so there are a lot of questions and grumbling in the development community.  Surely, they’ll work to clarify as they go, but there may be some pain points ahead:

  1. No upgrade path.  If you want to convert your Angular 1.x application to version 2, it will take a good amount of work.
  2. New syntax=learning curve.  Developers who invested heavily in Angular 1 are understandably irritated that a lot of that investment is lost on what feels like a brand new set of  rules.
  3. Some of that new syntax doesn’t really run on some browsers.  For instance the bracket syntax [] is technically valid HTML, but some browsers throw a hissy fit if you try to use it.

Watching Angular 2.0 shape up is fascinating, scary, but in general, very exciting.  If you’re an Angular user, what are your thoughts?

Dan Clouse

Senior Developer
  • Angular.js
  • Announcement

Recent Work

Check out what else we've been working on