Populating the options for a <select> element with a sub-template like this:
- <%= function( el ) { jQuery( el ).html( can.view( 'ofct', { el: el, e: e, f: f } ) ) } %>
works fine.
But trying to call a deferred function like:
- <%= function( el ) { jQuery( el ).html( can.view( 'ofct', { el: el, e: e, f: f } ).then( function( frag ){ console.log('then') } ) ) } %>
throws an error: Uncaught TypeError: Object #<DocumentFragment> has no method 'then'
Is there a way to properly call .then( when rendering an EJS sub-template?