jeudi 21 mai 2015

EmberJS computed properties in view

var myArray = [{"label":"input1_b1","value":"Connector Pin 3, Signal Label IN-1, Wire Color Blue","isEditableVehicle":true,"config":{"label":"Siren","zero_label":"Off","one_label":"On","colour":{"enum":0,"value":1,"map":true}},"state":1,"isUsed":true},{"label":"input2_b2","value":"Connector Pin 12, Signal Label IN-2, Wire Color Orange","isEditableVehicle":true,"config":{},"state":1,"isUsed":false},{"label":"input3_b3","value":"Connector Pin 6, Signal Label IN-3, Wire Color Violet","isEditableVehicle":true,"config":{"label":"Lights","zero_label":"Off","one_label":"Flashing","colour":{"enum":5,"value":0,"map":true}},"state":1,"isUsed":true},{"label":"input4_b4","value":"Connector Pin 7, Signal Label IN-4, Wire Color Grey","isEditableVehicle":true,"config":{"label":"Trunk","zero_label":"Closed","one_label":"Open","colour":{"enum":6,"value":1,"map":false}},"state":1,"isUsed":true}];

The above is an array of objects from controller, and in the template i am passing the array and creating views by array in the bellow {{#each myArray}} {{view entityBinding=this}} {{/each}}

and each view will contain certain computed properties .

While on clicking of submit button, I want to retrieve all the computed proprties of each view to pass to another controller.

Please guide on this situation.




Aucun commentaire:

Enregistrer un commentaire