Backbone Model.fetch() - how does it take care of duplicates

22 views Asked by At

As per the backbone js documentation, model.fetch() merges current model's state with server if different exists in the attributes.

Question 1: Is there a way I can tell backbone to overwrite the attribute in the server's model with the local model ?

Question 2: How can I view all the attributes in a model using Chrome Dev Tools?

Thank you

1

There are 1 answers

0
harmancode On

1: You can use the save method.

2: You can see modal attributes with Chrome Developer Tools like so:

How to see modal attributes with Chrome Developer Tools