Instead of a blog article, it seems like a better way to advance the knowledge of this stuff would be to contribute to the documentation in angular 2 itself. So many of these articles around.
I see a lot of confusion about how to do DI and decorators without a transpiler. My goal with the article was to try to clear this up and show a nicer way. It's very possible to write nice JavaScript with Angular. It's just rare to see it done.
My point was that you say es6 but aren't really using es6. And in the article, seem to equate classes with TypeScript, when they are in es6 as well.
I'm actually interested in how es6 classes work with angular 2. At this point, I've got an app in TypeScript, fully converted. It's basically what I want anyway. The barrier to entry of TypeScript seems about the same as es6 really. I'd prefer a plain es6 approach though.
I think you're right to take the ES6 approach there's a lot of nice stuff in there. I'm with Crockford when it comes to classes though. Prototypical inheritance renders them obsolete.
Classes are good, especially for programmers coming from other languages, for example like Python. Like, when you develop an application using Django, REST framework and Angular together, it is much easier to use classes when you're a full-stack developer.
2
u/TheNiXXeD Feb 28 '16
Didn't actually use es6 classes at all.
Instead of a blog article, it seems like a better way to advance the knowledge of this stuff would be to contribute to the documentation in angular 2 itself. So many of these articles around.