4 ms·
I want to be excited, but at the moment there's just so much new and unknown stuff I'm seeing that I'm just not sure. I don't like the new template syntax; html
by Cthulhu_ 12y ago
I want to be excited, but at the moment there's just so much new and unknown stuff I'm seeing that I'm just not sure. I don't like the new template syntax; html attributes with parentheses and whatnot just look non-standard and I don't really see why they did all that. I really need to dig into the design documentation and find out the whys behind all of these new features.
ES6 is also new, of course; when I first saw Angular 2.0 code, I didn't like it - mostly due to DI, which instead of a single argument in a simple function, now consisted of three different statements to have one service injected, which just feels non-DRY.
- nateabele 12y agoI've spent some time with di.js [0], and it actually allows a few different ways of handling injection, one of which is simple type annotation, i.e.: class Foo { constructor(bar: Bar, baz: Baz) { ... } } There's also syntax for using @Inject annotations inline in the constructor to provide more flexibility. The architecture may be coming together, but it sounds like there's still a long way to go before it's a fully-realized framework with more friendly conventions. If anything, I think the upshot is that DOM handling has been pushed further to the edges, and the emphasis is on pure composition of classes and data structures, with less boilerplate, hand-waving, and framework-centricity. [0] https://github.com/angular/di.js https://github.com/angular/di.js
- EugeneOZ 12y agoI disagree. New syntax actually gives much more for compatibility with other technologies and IDE integration. Also clean visual difference between events and properties - big thing. Not valid HTML... Well, not so high price.
- acjohnson55 12y agoThat's a fair point. Being able to differentiate complex directives from attributes greatly helps separate the concerns visually.