Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You are right about the first situation. Currently doing animations with Angular is not a trivial task. This is mostly because of its "No DOM manipulation in Controllers clause". If you break that clause, having a repeat with animations is possible ( not trivial - but possible! ).

Angular does have a conditional add/remove element. You can use ng-switch for that. If you are using CSS selectors in an angular app I sense a smell. Something is not right.



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.


Oh sorry, I was under the assumption that you were using CSS selectors in JS not in CSS.. If its in CSS, then it should be fine. If you are using CSS selectors in JS in an angular app.. then that seems like a smell.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: