mardi 18 septembre 2018

Access webhook variables in front end

I'm developing the front-end and back-end of a web application using emberjs, now I have some data in webhooks.js in the back-end that I need to process in the front-end, the front-end javascript file is located in a handlebar(.hbs) under templates folder.

My question is, what's the best way to access a back-end variable in the front-end javascript?

For example, I use router.post to retrieve some data from the Stripe endpoint, then I want to send the data to my front-end, so I can do something to that data in the javascript.




Aucun commentaire:

Enregistrer un commentaire