rivets-backbone-adapter icon indicating copy to clipboard operation
rivets-backbone-adapter copied to clipboard

Rivets is not subscribe to model via adapter in case of dependency

Open mogadanez opened this issue 12 years ago • 4 comments

Don't know it is adapter or rivets itself problem. Demo: http://jsfiddle.net/Nwq9J/5/

mogadanez avatar Mar 04 '14 17:03 mogadanez

Try this:

model.someFunc < :name

http://jsfiddle.net/Nwq9J/6/

PS better to use rawgithub.com than raw.github.com

azproduction avatar Mar 05 '14 06:03 azproduction

yes, this helps when computed property and watched property in same model. but not work when it's different http://jsfiddle.net/Nwq9J/10/

in real life it is view and model objects provided to binding

PS. i'm trying to upgrade from rivets 0.4 to latest one, and have many compatibility issues.

mogadanez avatar Mar 05 '14 18:03 mogadanez

I think that if a computed property depends on property of external model you are doing something wrong. Anyway it is up to you to decide.

azproduction avatar Mar 05 '14 19:03 azproduction

In case when I have several views to one model it looks very logical for me. Each view show some of model's values different way, I not want put all this view-dependent methods in model.

without binding I should do it in view by subscribe and update manually.

On Wed, Mar 5, 2014 at 11:02 PM, Mikhail Davydov [email protected]:

I think that if a computed property depends on property of external model you are doing something wrong. Anyway it is up to you to decide.

Reply to this email directly or view it on GitHubhttps://github.com/azproduction/rivets-backbone-adapter/issues/4#issuecomment-36779805 .

mogadanez avatar Mar 06 '14 07:03 mogadanez