promise
promise copied to clipboard
async/await error: Unexpected token function
I'm getting an 'Unexpected token' error when I try to use the async/await pattern. My code looks something like this, any idea what I'm doing wrong?
Template.fragments.events({
'submit .copyContent': async function(e,t){
var text = await Meteor.call('getContent', selector);
console.log(text.split"<p>");
});
I posted the same issue here: https://github.com/okgrow/meteor-promise/issues/4
Yeah, async functions are currently not enabled by the ecmascript package, though I am eager to consider enabling them if there is interest.
I'm interested!
I’m obviously interested :)
I’ve been trying to understand how the example of the async/await pattern is used on okgrow:promise’s example: http://okgrow-promise.meteor.com/ I tried with grigio:babel, but it gave me the same error, and okgrow is now deprecated, so I assumed the same functions would be carried over into this package.
Thirded, interested!
Hi @benjamn any news on async/await support? I can enable this my self on babel settings or ... ?
Please enable this
I'm also interested in this
@purplecones It's supported in Meteor 1.3+