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

justinbmeyer opened this Issue Jan 9, 2014 · 1 comment


None yet
2 participants

justinbmeyer commented Jan 9, 2014

If you define a Map view model like:

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

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

  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".

This comment has been minimized.

Show comment
Hide comment

andykant Jan 21, 2014


(Fixed with the pull request)


andykant commented Jan 21, 2014

(Fixed with the pull request)

@andykant andykant closed this in 1e97186 Jan 22, 2014

andykant added a commit that referenced this issue Jan 22, 2014

Merge pull request #684 from bitovi/component_map_@
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