Friday 15 February 2013

ember.js - Accessing Values for Key in Handlebars & Ember -


Is it possible to access properties in the value-key-key style in the handler?

I have a collection view that uses the full arrocator of the model. Collection Wei is a property called 'Column' which defines the table column configuration for rendering.

Ideally I can be able to loop through each column (see the example below) to ensure that only the columns that we want are rendered (and later, formatting and other attributes Is applied)

  & lt; Tr & gt; {{# View in the column column. Controller.column}} & lt; Td> {{View. Content [Column.name]}} & lt; / Td> {{/ Every}} & lt; / Tr & gt;   

It does not work, it just does not give any content.

I have also tried these other styles to see if they will work:

   {{View.content.name}} {{View. Content [Column.name]}} {{valForKey View Content Column} Name}} & lt; / Td> {{/ Every}} & lt; / Tr & gt;   

ValForKey is the assistant I've written (), which does displays the correct value, but does not bind, so the value < / P>

thanks

= "post-text" itemprop = "text">

You display the column value Can be a helpful helper for

  Ember.Handlebars.registerBoundHelper ('dd', function (row data, Cole) {returning row data [Col.];});   

See the following SO answers for more details



No comments:

Post a Comment