Skip to content

Make the resolved data available when using can.view #209

Closed
@basememara

Description

@basememara

An extra callback parameter was provided in 1.1.3 for can.view.render, but this is not working for can.view.

For example, data is defined here:

        can.view.render('dummyEJS', {
            user: User.findOne({id: 1})
        }).then(function(frag, data) {
            //data is defined
        });

However, data is undefined here:

        can.view('dummyEJS', {
            user: User.findOne({id: 1})
        }).then(function(frag, data) {
            //data is undefined
        });

The problem in the source seems to be that you can't just pipe deferreds that resolve with more than one argument.

A jsFiddle sample can be seen here: http://jsfiddle.net/basememara/j9XSw/7/
Related issue can be seen here: #183

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions