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

Try to do better with view attributes, to be able to automatically bind view attributes from the view to the domNode. #39

Open
edchat opened this issue Jun 23, 2014 · 3 comments

Comments

@edchat
Copy link
Contributor

edchat commented Jun 23, 2014

This issue is related to #25
Even after the updates for #25 we will have to update the attribute on the view.domNode.attr in order to update the value in handlebars. It would be better if we could update the view.attr instead, but that would require some data binding between the view and view.domNode attrs.

@cjolif
Copy link
Contributor

cjolif commented Jun 24, 2014

In order to solve the problem of the binding not being "live" I guess a solution would be for the ViewBase Widget to be the widget that received the template. Instead of being 2 different widgets?

The problem is that we need a different Widget for each view (because of the template issue requiring us to register a different one each time) but this should be doable? For example in the Load controller instead of directly instantiating the View we would:

  1. load the template
  2. compile it
  3. create a Widget from the View and the template
  4. instantiate it

Thoughts?

@cjolif
Copy link
Contributor

cjolif commented Jun 24, 2014

(that would break the nice property of encapsulating the template loading in the view itself however)

@edchat
Copy link
Contributor Author

edchat commented Jul 9, 2014

I will try to see if I can get this to work.

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