Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

106
Views
Handelbars variables via Handlebars.registerPartial

I have a Handelbars app that loads data from javascript and partials for the templates. To get the templates to work I use the following in the Javascript:

var data = require('partials/data.js');
Handlebars.registerPartial('data', data);

Then in my partial I am able to do:

{{> data }}

I have a Handelbars variable I can use in my main template but I want to pass it down to the partial. With my other partials that don't register via the Javascript this is possible. I am assuming I need to pass this variable down like I do the templates?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

As per the handlebars documentation, you should be able to simply pass the variable down as a parameter, like so:

{{> data parameter=variable }}
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!