Is there a variable passed into every handlebar.js template that contains all the context content that is accessible by the template?
e.g. I'm creating a template, but I don't know all the context content accessible by the template. I want to be able to type into the template {{ debug }}
and handlebars.js will spit out all the context content into the HTML
You can use the following code to iterate through this
object:
{{#each this}}
{{@key}}: {{this}}
{{/each}}
or a similar piece of code iterating through @root
object:
{{#each @root}}
{{@key}}: {{this}}
{{/each}}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With