Giter Club home page Giter Club logo

Comments (4)

homerjam avatar homerjam commented on August 29, 2024

Actually I think thats desired behaviour - but its strange that its working differently per environment. My guess that some delay in the dev environment (loading, bootstrapping etc) is causing the transitions to be triggered mistakenly.

To resolve your problem I would suggest manually triggering the initial transition, or perhaps transitioning to/from a blank state/view.

from angular-ui-router-anim-in-out.

grabbou avatar grabbou commented on August 29, 2024

@homerjam thanks for quick response. Actually, I think it's due to desired behaviour of Angular -> angular/angular.js#5130. Fortunately there's a quick fix (monkey patch but worth giving a go) that does the trick.

It turns out that digest cycle runs somehow when dependencies and app files are separate (~70 GET reuests in the background) which is no long a case in production environment when everything is located inside one file.

from angular-ui-router-anim-in-out.

homerjam avatar homerjam commented on August 29, 2024

Ah, interesting - I've never come across that myself. I'll add a note in the readme. Thanks

from angular-ui-router-anim-in-out.

grabbou avatar grabbou commented on August 29, 2024

No worries, thanks again! It's quite funny that they did that to disable first-load animations, but it's probably because they didn't want e.g. ng-repeat to animate on load (as it has no elements so enter animation is useless).

As you can see from the message above, they monkey patch $rootElement with animation attribute.

Actually, we might create another directive attribute animate-on-load="true" and try to set $element.data('$$ngAnimateState').running = false; instead of changing $rootElement behaviour by default, so maybe somehow it will work for selected elements only (e.g. animate left sidebar on page load with anim-in animations specified but right sidebar should animate only after digests run). That might work better if one have other animations inside container (ng-repeat for instance)

from angular-ui-router-anim-in-out.

Related Issues (20)

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.