Comments (4)
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.
@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.
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.
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)
- Bower files HOT 3
- Main attribute on bower.json HOT 1
- Publish on npm and prepare for browserify HOT 4
- Trouble with project name HOT 1
- Slide synced animation pushes the exiting view down HOT 1
- Animation not working on load/reload HOT 5
- How can I troubleshoot animation issue? HOT 2
- Transition issue. Both views are being displayed HOT 2
- Possible to have the animation without absolute view? HOT 2
- The ui-view in SCSS HOT 1
- Gap between ui-views when sliding left or right HOT 1
- Animation between views HOT 3
- Transition superseded HOT 1
- Can you make the in and out transitions different? HOT 1
- data-anim-speed is ignored when data-anim-sync is true HOT 2
- AnimOut not triggered in Angular v1.2.26 HOT 4
- What's the purpose of this directive over just ngAnimate? HOT 1
- View is not hidden before the transition HOT 14
- Animation failed with error when debugInfoEnabled(false) HOT 2
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-ui-router-anim-in-out.