You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Basically, can.view() currently accepts renderer function as a first parameter. But in this case view does not enter defferreds logic work flow.
Here is a part of the view method from can/view.js, version 2.1.2:
if( isFunction(view) ) {
result = view(data, helpers, callback);
} else {
result = $view.renderAs("fragment",view, data, helpers, callback);
}
As you can see, if renderer is a function, view renders it immediately and does not check for deferreds. Thus it's not possible to use pre-compiled templates with deferred data in such way.
The text was updated successfully, but these errors were encountered:
Please check this example: http://jsfiddle.net/a35ZH/1/
Basically, can.view() currently accepts renderer function as a first parameter. But in this case view does not enter defferreds logic work flow.
Here is a part of the view method from can/view.js, version 2.1.2:
As you can see, if renderer is a function, view renders it immediately and does not check for deferreds. Thus it's not possible to use pre-compiled templates with deferred data in such way.
The text was updated successfully, but these errors were encountered: