【发布时间】:2023-01-11 17:16:45
【问题描述】:
async getExample(value: string) {
// this must be done first
if (this.componentRef) {
this.componentRef.location.nativeElement.classList.add('fadeMeOut');
}
// this must be done second
switch (value) {
case this.tag[0]: {
await this.getAlbum();
break;
}
default: {
//statements;
break;
}
}
}
我想使用回调功能来解决问题,但我不知道如何。 基本上,我想完全完成第一部分,然后继续进行第二部分。
逻辑是调用第一部分,回调第二部分。 我非常感谢任何帮助。 谢谢你。
【问题讨论】:
-
它已经从上到下执行了,那么问题是什么?你想等动画先结束吗(fadeMeOut 看起来像动画相关的类)
标签: angular