I'm attempting to use Handlebars templates with Backbone w/ Marionette. Maybe I'm biting off more frameworks than I can chew right now but if I can work through this last issue then I will have all the pieces worked out.
So what I have right now is Marionette Layout being rendered with a Handlebars template. The static code in the template is rendering so I am assuming that at least the basic wiring is correct. I added some debug code to the success callback of my model's fetch call, like this:
success: function(model, response, options) {
$.log(response);
}
What I get for the response is something like this (data sanitized but you get the idea):
{
"adminLoginId": 0,
"deviceHashAVInfos": [
{
"foo": "bar"
}
],
"orgId": 0,
"timeTaken": 39,
"numHits": 1,
"message": "success",
"success": true
}
So, it seems to be getting data back from the service. But for the life of me, I can't seem to get the syntax correct to read the data. Just trying to access the orgId, for example, I've tried: {{orgId}},{{this.orgId}},{{data.orgId}},{{response.orgId}},{{attributes.orgId}}
. I've even tried to set the orgId as a default value in the model.