2012-06-03 7 views

risposta

28

Guardando il source, sembra to_html è stato essenzialmente deprecato:

// This is here for backwards compatibility with 0.4.x. 
exports.to_html = function (template, view, partials, send) { 
    var result = render(template, view, partials); 

    if (typeof send === "function") { 
     send(result); 
    } else { 
     return result; 
    } 
}; 

Come si può vedere si invoca rendono. L'unica differenza è il parametro addizionale send, che è una richiamata invocata (inviando il risultato come parametro).

+4

Grazie mille. La buona lezione per me è iniziare a guardare il codice sorgente. – ehabd

Problemi correlati