javascript - Accessing attributes of backbone model -


I am making my first application with Backbone + Marriott JS + Rail and I have a problem with accessing model attributes. Get the model from server with the following code:

  getCrewMember: (id) - & gt; Members = new organizations Crew ID: id member.fetch () Member  

Here is the output of console.log member:

...

  Features: Object Crew: Object Crew Property 1: "Value 1" CrewProperty 2: "Value 2" ID: "1"  

...

Question The crew: how objects are used? ( crewProperty1 , crewProperty2 ) and get the price there, because I can only use the ID property.

Backbone get methods, methods for accessing, updating and updating, and providing definite methods.

The ID is detected, so you do not have to meet.

In your example, you should be able to use properties like this:

  model.get ('crew'). CrewProperty1 / value1  

Comments

Popular posts from this blog

Member with no value in F# -

java - Joda Time Interval Not returning what I expect -

c# - Showing a SelectedItem's Property -