Comments (6)
@nikeshbhagat Hi, good question, actually it is possible BUT it strictly depends on the use case, check:
<button
class="btn btn-large bg-error color-white"
ngfx-default="show"
ngfx-speed="slow"
ngfx-bounce-in="x <= 5"
ngfx-fade-out="!x">
First fadeout then bouncein
</button>
if you add this button inside the page here https://github.com/720kb/angular-fx/blob/master/index.html , then run the same page in the browser, you'll see the element first fade-out then bounce-in.
It uses ngfx-default="show"
so it first shows the element by default > fadeout -> bounce in
In other cases it could be useful ngfx-default="hide"
instead ... so i would suggest you to try something and to report what and if something is not working (better if you attach a plunkr or jsfiddle with it).
Let know and thank you for the question.
from angular-fx.
Thanks for your explanation and speedy reply. I'll experiment a bit and let you know.
Of course, thanks for ngfx, in general - very handy.
from angular-fx.
@nikeshbhagat you're welcome!
from angular-fx.
I'm having trouble with this as well. I have attached plunk.zip to give you an example of what it is I'm trying to do. In the end, I'm trying to get the first element to fade in, then when i click the button, fade out and trigger the next element to fade in. Any help you can provide would be greatly appreciated. Thanks!
from angular-fx.
Nevermind, answered my own question! The key here is to have two different variables controlling the animations. Once I split ngfx-fade-in-up
to be controlled by one variable and ngfx-fade-in-out
to be controlled by a different variable, everything worked great. Thanks for this awesome module! 👍
from angular-fx.
@ethanmay you're welcome, actually this could be improved anyway, since there still troubles using more than 1 or 2 animations on the same element, one more trick is to use a new element like a <span>
to wrap every animation, but well... if you solved i am glad.
from angular-fx.
Related Issues (15)
- gh-pages browser support
- bower HOT 1
- options HOT 1
- multiple directive animations on same element
- .ng-(fx)-start
- Scroll, in, out, up, down, left, right HOT 1
- Split into multiple files (angular-fx-roll.js, angular-fx-fade.js etc...)
- More animations
- Reduce file size HOT 1
- Replace "infinite" as an attribute instead of a class HOT 1
- Allow attribute directives to be added without a value HOT 1
- Internet Explorer Smoothness HOT 1
- Shake not working HOT 5
- Play animation multiple times
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from angular-fx.