Quantcast
Channel: JavaScriptMVC Forum
Viewing all articles
Browse latest Browse all 3491

can.view Deferred for Sub-Template render

$
0
0
Populating the options for a <select> element with a sub-template like this:
  1. <%= function( el ) { jQuery( el ).html( can.view( 'ofct', { el: el, e: e, f: f } ) ) } %>
works fine.
But trying to call a deferred function like: 
  1. <%= 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?



Viewing all articles
Browse latest Browse all 3491

Trending Articles