Developer Preview: Angular 2
May 5, 2015
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:
- Tight integration with TypeScript to simplify writing compilable code.
- Differentiation in the markup:
- Square brackets  signify expressions or properties.
- Parenthesis () signify event listeners.
- The pound/number/hash symbol is used as a reference- particularly handy for iteration.
- Asterisk can be used for flow-control directives like “for.” Combined with the # sign, it would look like:*for=”#name in names”
- Scope isolation!
- Transclusion is being retired.
- Shadow DOM and performance improvements.
- 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:
- No upgrade path. If you want to convert your Angular 1.x application to version 2, it will take a good amount of work.
- 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.
- 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?
Stay up to date with our email updates!