angular-scroll-animate
angular-scroll-animate copied to clipboard
CSS class helper?
Hello!
Thank you for this great module!
However, I have a proposition.
It would be great to have a CSS class helper in order to use it like this:
when-visible-class="animated fadeInUp"
It will add a CSS class when element is visible and remove it when it's hidden. I think this is the most commonly used scenario. It will make end-user's code much cleaner.
Happy to look at a PR. I didn't want to force any CSS on the consumers of this since it can be quite different depending on how you want to use it. These are also quite generic class names which could be overriding other styles (which I want to avoid). The examples contain typical usages though.
I do like the idea, but feel like as soon as I implement it, i'll get other people asking for a javascript callback instead ;) I'll leave this open, if we get plenty of +1s i'll action it.
More thinking - if this was a separate attribute (ie. optional) I think it would be fine. Let me know if you want to do a PR otherwise I might get to it sooner or later.