Skip to content
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

scope as Map constructors do not respect default "@" values #657

Closed
justinbmeyer opened this issue Jan 9, 2014 · 1 comment
Closed

scope as Map constructors do not respect default "@" values #657

justinbmeyer opened this issue Jan 9, 2014 · 1 comment
Milestone

Comments

@justinbmeyer
Copy link
Contributor

If you define a Map view model like:

var PanelViewModel = can.Map.extend({
  title: "@"
})

And specify it as scope on a can.Component like:

can.Component.extend({
  tag: "panel"
  scope: PanelViewModel
})

The title value is not read from the <panel> element's attribute.

<panel title="Libraries">Content</panel>
$("panel").scope().attr("title") //-> "@", but should be "Libraries".
@andykant
Copy link
Contributor

(Fixed with the pull request)

andykant added a commit that referenced this issue Jan 22, 2014
Added support for Component attribute lookups for Map-based scopes #657
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants