Sunday, 11 June 2017

Get async value into a handlebars helper

I have a node mysql function with this signature.

clientType.getClientType(databaseConnection, parseInt(str));

how can i use the data from that function inside my handlebars helper? I cannot understand how I should do that with a callback or whatever.

handlebars.registerHelper('client_type_name', function(str, callback){

});

i need the handlebars helper to return the data from the mysql function



via Daniel H

No comments:

Post a Comment