本文整理匯總了TypeScript中@angular/platform-browser/src/animate/css_animation_builder.CssAnimationBuilder類的典型用法代碼示例。如果您正苦於以下問題:TypeScript CssAnimationBuilder類的具體用法?TypeScript CssAnimationBuilder怎麽用?TypeScript CssAnimationBuilder使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
在下文中一共展示了CssAnimationBuilder類的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: colorize
colorize() {
let animation = this.cssAnimationBuilder.start(
this.elementRef.nativeElement
);
animation.onComplete(() => {
animation.applyStyles({ backgroundColor: 'inherit' });
});
}
示例2: parseInt
ngOnInit(): void {
this.resetPomodoro();
setInterval(() => this.tick(), 1000);
let taskIndex = parseInt(this.routeParams.get('id'));
if (!isNaN(taskIndex)) {
this.taskName = this.taskService.taskStore[taskIndex].name;
}
const anim = this.fadeInAnimationBuilder.start(
this.elementRef.nativeElement.firstElementChild
);
anim.onComplete(()=> alert('blah'));
}
示例3: constructor
constructor(
private settingsService: SettingsService,
private routeParams: RouteParams,
private taskService: TaskService,
private animationBuilder: AnimationBuilder,
private elementRef: ElementRef) {
this.buttonLabelsMap = settingsService.labelsMap.timer;
this.fadeInAnimationBuilder = animationBuilder.css();
this.fadeInAnimationBuilder.setDuration(1000)
.setDelay(300)
.setFromStyles({ opacity: 0 })
.setToStyles({ opacity: 1 });
}