Notice: file_put_contents(): Write of 16892 bytes failed with errno=28 No space left on device in /var/www/tgoop/post.php on line 50
Frontender Libs - обзор библиотек JS / CSS@sWebDev P.3341
SWEBDEV Telegram 3341
Управление анимациями с помощью AnimationBuilder

AnimationBuilder из модуля animations позволяет создавать анимации в Angular. Он используется для динамического запуска или изменения анимаций на основе логики приложения.

Пример:
import { Component, ElementRef } from '@angular/core';
import { AnimationBuilder, style, animate } from '@angular/animations';

@Component({
selector: 'app-animation',
template: `<div #box class="box"></div><button (click)="animate()">Animate</button>`,
styles: [`.box { width: 100px; height: 100px; background: red; margin-top: 20px; }`]
})
export class AnimationComponent {
constructor(private builder: AnimationBuilder, private el: ElementRef) {}

animate() {
const animation = this.builder.build([
style({ transform: 'translateX(0)' }),
animate('1s', style({ transform: 'translateX(300px)' })),
animate('1s', style({ transform: 'translateX(0)' }))
]);
animation.create(this.el.nativeElement.querySelector('.box')).play();
}
}

👉 @sWebDev
👍4🔥3



tgoop.com/sWebDev/3341
Create:
Last Update:

Управление анимациями с помощью AnimationBuilder

AnimationBuilder из модуля animations позволяет создавать анимации в Angular. Он используется для динамического запуска или изменения анимаций на основе логики приложения.

Пример:

import { Component, ElementRef } from '@angular/core';
import { AnimationBuilder, style, animate } from '@angular/animations';

@Component({
selector: 'app-animation',
template: `<div #box class="box"></div><button (click)="animate()">Animate</button>`,
styles: [`.box { width: 100px; height: 100px; background: red; margin-top: 20px; }`]
})
export class AnimationComponent {
constructor(private builder: AnimationBuilder, private el: ElementRef) {}

animate() {
const animation = this.builder.build([
style({ transform: 'translateX(0)' }),
animate('1s', style({ transform: 'translateX(300px)' })),
animate('1s', style({ transform: 'translateX(0)' }))
]);
animation.create(this.el.nativeElement.querySelector('.box')).play();
}
}

👉 @sWebDev

BY Frontender Libs - обзор библиотек JS / CSS




Share with your friend now:
tgoop.com/sWebDev/3341

View MORE
Open in Telegram


Telegram News

Date: |

3How to create a Telegram channel? The administrator of a telegram group, "Suck Channel," was sentenced to six years and six months in prison for seven counts of incitement yesterday. Some Telegram Channels content management tips Developing social channels based on exchanging a single message isn’t exactly new, of course. Back in 2014, the “Yo” app was launched with the sole purpose of enabling users to send each other the greeting “Yo.” The group’s featured image is of a Pepe frog yelling, often referred to as the “REEEEEEE” meme. Pepe the Frog was created back in 2005 by Matt Furie and has since become an internet symbol for meme culture and “degen” culture.
from us


Telegram Frontender Libs - обзор библиотек JS / CSS
FROM American