title: Is it possible to access the data that is sent to handlebars through JS inside the template?
body: <p>So lets say I generate content from an external handlebars template (through AJAX)</p>
  
  <pre><code>$.ajax({
      url: path,
      dataType: 'html',
      success: function(data) {
          source    = data;
          template  = Handlebars.compile(source);
          //execute the callback if passed
          if (callback) callback(template);
      }
  });
  </code></pre>
  
  <p>Now inside my template.handlebars I output the data I sent using the tags {{this}} etc.
  But I also include some javascript that are only meant for that template on the bottom of the template (which works fine). However I need to access some of the data sent to the template inside the javascript, is it possible?</p>
  
  <p>A really dumb example which I know doesn't work but should explain what I'm after incase it's unclear. So this could be an example of my template.handlebars file:</p>
  
  <pre><code>&lt;h1&gt;{{question}}&lt;/h1&gt;
  
  &lt;script&gt;
  //want to access the data sent to template in the JS included
  (function($) { //wrap to local scope
      $(document).ready(function() {
          //this doesn't work ofcourse.. but should explain what I'm after
          var question = {{question}};
          console.log(question)
      });
  })(jQuery);
  </code></pre>
  
  <p>Any ideas on how to do that? For me it feels clean to include the JS that is only meant for the particular template this way.</p>