Better HN
topnewbestaskshowjobs
Log inSign up

CapnCrooked

4 karma · joined Jan 4, 2013 (13y ago) · 2 submissions

Submissions

comment 13y ago · link · parent

Yeah, I came up with a number of potential workarounds to the animation issue, all of which involved doing "non-angular" things. That wasn't ideal, but what really turned me off was how difficult it seemed to be to extend, compose, wrap, or otherwise re-use directives.

You're right - you could use ng-switch for add/remove. It's a bit awkward though. I'm curious as to why you'd consider "CSS selectors" a smell in an angular app. I'm assuming you mean some subset of CSS selectors (possibly just the first/last/nth-child selectors I mentioned?), as without selectors you can't really have CSS.

comment 13y ago · link · parent

I just finished evaluating frameworks for a project and chose Knockout over angular for a couple of reasons:

Extensibility & hooks: Extending built in behavior in Knockout was much easier than in Angular. Without getting into too much detail, one of the things I tried to do was create a list of items on the page with a simple animation for item removal. In Knockout, it was trivial. In angular it would have required a copy-pasta style rewrite of the repeat directive.

Some weird missing features: Angular has no conditional add/remove element directive (that I could find). This just seems like a weird oversight. There's a show/hide element directive, but trying to substitute that for add/remove will break CSS first/last/nth child selectors.

Angular has a lot of potential, but it felt to me like it needs a few more iterations before I'd want to try to build a rich UI on top of it.