angular-animations

Need to pause the Carousel animation regularly and call a function

痴心易碎 提交于 2021-02-11 12:51:45
问题 I have a Carousel animation: which is working fine but I need to pause it after a duration and call a function. As soon as the cards change their position, I want to pause it, call my function, and as soon as the execution of that function is over, again restart the animation. And I want to do this indefinitely. I am creating my animation using AnimationBuilder 's build() function. I tried to make use of AnimationPlayer 's pause() and restart() methods but was not able to set them properly.

Need to pause the Carousel animation regularly and call a function

故事扮演 提交于 2021-02-11 12:51:10
问题 I have a Carousel animation: which is working fine but I need to pause it after a duration and call a function. As soon as the cards change their position, I want to pause it, call my function, and as soon as the execution of that function is over, again restart the animation. And I want to do this indefinitely. I am creating my animation using AnimationBuilder 's build() function. I tried to make use of AnimationPlayer 's pause() and restart() methods but was not able to set them properly.

Angular 2: How do I use angular animations to fade in/fade out of components within <router-outlet> after the initial load?

萝らか妹 提交于 2021-02-08 05:30:10
问题 As of right now, the code is working as it should (but now how I want haha). The animation works and fades in when the page initially loads & is first initialized but the animations do not occur when I am accessing routes within the after the initial page fade in. Just wondering how I could implement my animation to each sibling route. Any help is appreciated, thank you! Below are my app component files where I wrote the animation. I then put the trigger into the HTML. app.component.ts

How to change an Angular animation during runtime?

时间秒杀一切 提交于 2021-01-29 05:44:16
问题 In my Angular component a table shall be displayed line by line, then wait few seconds, remove the table lines and show the next lines. That works well so far. But now I have two "small" issues with the animations: I need to insert a "wait" (see code below) to ensure that the a previous :leave has been finished. Otherwise printing of new lines are overlapping with removing the old lines. The problem is now that this "wait" also is applied on the very first run. How can I avoid that the "wait"

Angular Stagger Animation for multiple new elements

与世无争的帅哥 提交于 2021-01-29 05:30:59
问题 I'm trying to have a stagger animation in a list. Up till now I have managed to have the stagger animation on load. Apart from on load I'd like to have the stagger animation trigger when new items are added to the array. I followed this example: https://medium.com/google-developer-experts/angular-applying-motion-principles-to-a-list-d5cdd35c899e And came up with a quick test: https://stackblitz.com/edit/angular-stagger-animation-test2 In the app.component.ts I define the stagger animation and

MatSort breaks MatTable detail row animations

旧城冷巷雨未停 提交于 2021-01-21 07:50:09
问题 I've been beating my head against this problem for quite a while before I got here. Essentially, I have an Angular Material table that uses animations to create a detail row. When the table sorts, it rearranges the data. Some of the detail rows have a transition to void during that process. Afterwards, the detail rows stop playing the animation, even though the animation events are firing. I suspect that MatSort is breaking the animations somehow, but I'm not sure how. Angular Material table:

Cannot find module angular/animations

自古美人都是妖i 提交于 2020-08-22 00:44:39
问题 I am using webpack in angular2 and when i try to run my app i get an error stating Cannot find module "@angular/animations" package.json { "name": "angular-quickstart", "version": "1.0.0", "description": "QuickStart package.json from the documentation, supplemented with testing support", "scripts": { "start": "tsc && concurrently \"tsc -w\" \"lite-server\" ", "e2e": "tsc && concurrently \"http-server -s\" \"protractor protractor.config.js\" --kill-others --success first", "lint": "tslint .

Cannot find module angular/animations

試著忘記壹切 提交于 2020-08-22 00:41:32
问题 I am using webpack in angular2 and when i try to run my app i get an error stating Cannot find module "@angular/animations" package.json { "name": "angular-quickstart", "version": "1.0.0", "description": "QuickStart package.json from the documentation, supplemented with testing support", "scripts": { "start": "tsc && concurrently \"tsc -w\" \"lite-server\" ", "e2e": "tsc && concurrently \"http-server -s\" \"protractor protractor.config.js\" --kill-others --success first", "lint": "tslint .

animation on angular 4 doesn't seem to have transition effect

ε祈祈猫儿з 提交于 2020-06-25 05:24:46
问题 trigger('expandCollapse', [ state('open', style({ 'height': '*' })), state('close', style({ 'height': '0px' })), transition('open <=> close', animate(1000)) ]) using this code to animate expand collapse, the expand collapse works fine but there is no animation on height using angular animation framework 4.3.1 https://plnkr.co/edit/tY4z1QPvdKMeU6M82cTF?p=preview created a small demo for the same 回答1: The problem is that NoopAnimationsModule . This works: //our root app component import