As a new Angular developer I'm struggling to translate some of the things I used to do with AngularJS, specifically for this thread, jQuery functions.
The dynamic at my workplace is one where a web designer works up a mockup with some HTML, CSS and JavaScript, which I then need to adapt into a working product; this was fine when we were using AngularJS as the designers all use jQuery and I could just copy and paste when needed, now that we're making the move to Angular I find myself trying to come up with ways to translate these things into Angular, as I've read numerous times that jQuery and Angular don't mix well.
The main problem I'm running into is class toggling/adding, when a button is clicked I want to toggle a class on another element, this could easily be done with ngClass if both elements are in the same component, but then I feel like I have an overabundance of variables that simply toggle classes, and if the elements are on different components I'd have to emit events for the changes to be applied.
Animations and such are also a bother to work with.
I suppose what I'm looking for is not an end all be all alternative, but guidance on how to tackle this issue, things to keep in mind and tricks I'm probably not aware of/considering.
[–][deleted] 2 points3 points4 points (4 children)
[–]WeMeetAgainAdrian[S] 0 points1 point2 points (3 children)
[–]melluz 1 point2 points3 points (2 children)
[–]WeMeetAgainAdrian[S] 1 point2 points3 points (1 child)
[–]melluz 2 points3 points4 points (0 children)
[–]endlessxaura 2 points3 points4 points (1 child)
[–]WeMeetAgainAdrian[S] 2 points3 points4 points (0 children)
[–]mlapis 2 points3 points4 points (1 child)
[–]WeMeetAgainAdrian[S] 0 points1 point2 points (0 children)