Recent angular project has promise
everywhere so I started to use async/await
. Not sure this is just syntax thing.
The component and service both seem fine with it.
So even (click)="asyncFunc()"
is also seemingly OK.
async asyncFunc() {
this.data = await this.someService.asyncFun();
}
I want to know if anyone has experience with this.
Anything down the road that might be a problem? Just guessing here, maybe an async function kept waiting
then that component or that service involved might become hard to die
when route changes.