Giter Club home page Giter Club logo

Comments (6)

45kb avatar 45kb commented on May 26, 2024

@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.

nikeshbhagat avatar nikeshbhagat commented on May 26, 2024

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.

45kb avatar 45kb commented on May 26, 2024

@nikeshbhagat you're welcome!

from angular-fx.

ethanmay avatar ethanmay commented on May 26, 2024

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.

ethanmay avatar ethanmay commented on May 26, 2024

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.

45kb avatar 45kb commented on May 26, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.