Updated model is not reflected in template

I am updating template’s model in Controller. The model data is in the form

{
"key1": "value1",
"key2": [
    {
        "in1": "val1",
        "in2": "val2"
    },
    {
        "in1": "val3",
        "in2": "val4"
    }
]
}

After updating the model through controller, key1 value is refelcted in template. But Key2 values wrapped inside {{#each}} {{/each}} is not get reflected.

JsBin link: http://jsbin.com/dahehonagufi/3/edit

Kindly assist me what i am doing wrong here… asap

http://jsbin.com/dahehonagufi/7/edit

1 Like

If you want the template to update then you need to use objects created from the ember api

The reason for this correct me if I am wrong is because the variables need to be observed.

Classes to look at are

Ember.Object Ember.Array

Please refrain from asking questions such as these on the forum and use stack overflow insted

1 Like