From my experience with Angular, I've learned that directives are used for manipulating the DOM while controllers are more about controlling functionality.
I've been struggling to convert a small wizard into generic directives, aiming for reusability. However, achieving complete generality seems like quite a challenge.
The basic flow involves clicking a button within a div, triggering some logic, then executing fadeOut followed by fadeIn on a new div. This process is repeated until reaching the last window where another button click returns to the original div.
Currently, I have this working using nested jQuery selectors and fadeOut/fadeIn functions in the controller. While it functions well, I'm looking to separate it out to maintain best practices as much as possible.
One aspect that confuses me is that directives seem to be constantly updated at runtime, which doesn't align with the onClick nature of the fadeIn/Out functionality.
If anyone has advice on how to approach this situation, I would greatly appreciate it.