Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
View renderer functions don't work with Deferreds #486
referenced this issue
Sep 27, 2013
I'm actually not sure if it's possible or makes sense... can.view() does all Deferred-related magic currently (as well as wrapping renderer into can.view.frag() call for live binding). While renderer is just a function, which comes from can/view/ejs or can/view/mustache and renders template. So, as for me it makes sense to let can.view() to make its current job, which includes lazy model initialization. Just need to let can.view() accepts renderer function as a first argument (as proposed in #484). It's an easy fix. And it also consistent.
That is a good point and seeing as this doesn't work as I though it did, your suggested fix makes sense and would probably make less of an impact on the API. I was just thinking that renderer functions should work the same way as a