1

Depending on how I change the property in an object of an observableArray, the property value get updated or not in the HTML. I wish I could understand why...

I simplified my code as much as I could to show the difference:

  • one that work: updating the whole object

  • the other that Fails: updating only the method of that object

In both case I force the update with valueHasMutated.

http://jsfiddle.net/fCXAq/

1 Answer 1

2

Your val member needs to be an observable

http://jsfiddle.net/fCXAq/2/

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks. I now understand: a observableArray will get updated in the HTML only when it is an addition or removal of object (my working example). If need be to go in updating only its method (with no change to the full object) then those needs to be observed (the solution proposed for the non working example).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.