How to create nested models in Ember.js?

前端 未结 4 1431
感情败类
感情败类 2020-12-24 09:16

Going through Ember.js documentation, I am not able to figure out how to create nested models. Assume that I have the following JSON:

App.jsonObject = {
             


        
4条回答
  •  甜味超标
    2020-12-24 09:39

    You need to use pushObject not push when adding to Ember array objects with bindings. And you should probably use get() when accessing the positions property. See my jsFiddle for the corrections.

    http://jsfiddle.net/ud3323/Y5nG5/

提交回复
热议问题