Skip to content

need the ability to reference "this" and ancestor values within bindings #12

Description

@rafaelw

It may be that this is left to delegates to implement, but if so, we need tests showing that it is possible.

Activity

  1. ajklein commented on Aug 28, 2012

    @ajklein
    Owner

    I don't think either of these is possible with delegates as currently implemented. For "this", we'd need the delegate protocol to accept the empty path, so we might as well just implement that in MDV ourselves (unless we want to explicitly punt on syntax). For "ancestor", we'd need the ability for the delegate to pass back an object from which to start observing, since right now the paths are assumed to be relative to the model at the point where the curlies appeared.

    We probably want to allow the delegate to specify a different model anyway, but that falls more under "design delegate pattern" than "provide access to ancestor", and since the DOM is already in the business of creating model "scopes", seems like we should provide some way to access them too. So I'd argue these both should be implemented natively, not in the delegate.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions