New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can.Component ATTR value is undefined when passing a function as a scope #609

Closed
pawelbrzezinski opened this Issue Dec 13, 2013 · 1 comment

Comments

Projects
None yet
2 participants
@pawelbrzezinski

pawelbrzezinski commented Dec 13, 2013

http://jsfiddle.net/JEgt7/1/

When I try to use parentScope (so I define scope not as object but as a function) I am not able to use attributes' values (these from HTML) anymore (I get names of attributes but value is undefined).

@justinbmeyer

This comment has been minimized.

Show comment
Hide comment
@justinbmeyer

justinbmeyer Dec 19, 2013

Contributor

This is not a bug. There is no "234" value in the current scope of <results-tag>. It is trying to look up a value called "234" finding nothing and maping "234" to undefined.

However, to make what you want work, you can always read from el.attr("notworkingattr").

Contributor

justinbmeyer commented Dec 19, 2013

This is not a bug. There is no "234" value in the current scope of <results-tag>. It is trying to look up a value called "234" finding nothing and maping "234" to undefined.

However, to make what you want work, you can always read from el.attr("notworkingattr").

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment