javascript - how to access changed attributes after fetch? backbone.js -


I am using this code to fetch models from a server:

  Var id = Args.model.get ('id'); Var option = {action: 'getSubscriber', address: args.model.get ('address'), silent: true}; New Subscriber ({ID: ID}, Options) .Fatch ({Success: Function (Model, Response) {console.log (feedback); console.log (model);}}); The   

response contains all the data I need while the model does not store the data as its direct attribute, but as That has changed the object is wrong? Normally I use model attribute with the help of the model.get ('name') call. How do I use new features in that case? Is this the model.changed.thePropertyIwantToAccess ?

You might want to change it to change event

  this.model.on ('change', function () {var changedAttributes = this.model.changedAttributes (); // Processes on changed attributes}, this);   

Do this event in the start work of view )

Comments

Popular posts from this blog

Java - Error: no suitable method found for add(int, java.lang.String) -

c# - passing input text from view to contoller with FacebookContext using Facebook app -

Calling a C++ function from C# by passing a string with variable size to it -