I'm trying to display a dust template (compiled) within a backbone view.
here is my render function in the view :
render: ->
dust.render("customer-item", @model.toJSON(), (err, output) ->
throw err if err
$(@el).html output
)
@
When i lead the view i see 2 divs added inside my container (corresponding to the 2 models that should be loaded) but they are both empty. The individual template is not redered... When I debug the "output" variable i see the template so in theory it should be loaded properly...
When I do a simple test I can see an output for :
render: ->
$(@el).html "<span>TEST</span>"
@
But for that scenario I have no output :
render: ->
dust.render("customer-item", @model.toJSON(), (err, output) ->
$(@el).html "<span>TEST</span>"
)
@
Many thanks for your help.