Search code examples
javascriptember.jsslickgrid

Using EmberJS Helpers within SlickGrid?


I'm building a table with SlickGrid, and have tried to put in an EmberJS Helper such as {{#link-to 'servers/info' 123 tagName='a'}} to show as a value in that table (by putting that code into the formatter for the column).

But when the table gets displayed, it is displaying the EmberJS helper code, instead of it being transferred into a link as it should. I also tried putting this into an asyncPostRender for that column, but that doesn't help either.


Solution

  • I don't know EmberJS, but you need to distinguish between static and dynamic javascript. With most frameworks like Ember you hook everything up and then call an initialisation function on page load.

    SlickGrid dynamically creates elements as you scroll, so to make them ember components you are going to have to initialise them somehow. That should be part of your formatter code. I can't say more without learning Ember, which is something I'm (gasp) not really interested in.

    Good luck.