Access Nested Backbone Model Attributes from Mustache Template

后端 未结 4 821
不思量自难忘°
不思量自难忘° 2020-12-28 21:50

I have one Backbone model which has an attribute that is a reference to another Backbone model. For example, a Person has a reference to an Address object.

P         


        
4条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-28 22:18

    The way to go about the same in Mustache would be as follows:

    Hi

    {{FirstName}}, you live in {{#Address}}{{City}} {{/Address}}
    

    Hope it helps..

提交回复
热议问题