Reputation: 2433
I'm having problems using async await together with Aurelia Dialog. Basically I want to send away a request when the dialog is closed and currently it gives me syntax error:
Cannot find name 'await'
If I move the request outside the .WhenClosed function I dont get any syntax error and I can fire away a request.
Upvotes: 3
Views: 481
Reputation: 31
Maybe you should try to use
.whenClose(async (response) => { let result_2 = await this.organisationService... })
to instead~
Upvotes: 2
Reputation: 249606
The arrow function you pass to to whenClosed
has to be async
async response => {}
Upvotes: 5