本文整理汇总了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 });
}