i am new in emberjs, i want to implement hansontable in my handlebar emberjs view, my view code is given below
<script type=“text/x-handlebars” data-template-name=“clex/sc”> <div id=“spread-sheet” style=“width: 100%;”></div> </script>
currently i attaching hansontable to #spread_sheet div by using javascript on document ready function, example given below
<script>$(document).ready(function() {
var data = [[""]], spread_sheet = $("#spread_sheet");
var validateDate = /^[0-9]{2}-[0-9]{2}-[0-9]{4}$/; // mm-dd-yyyy
spread_sheet.handsontable({
autoWrapCol: true,
autoWrapRow: true,
columns: [
{data: 0},
{data: 1, validator: validateDate},
{data: 2},
{data: 3},
{data: 4},
{data: 5, validator: validateDate},
{data: 6},
{data: 7, validator: validateDate},
{data: 8},
{data: 9},
{data: 10},
{data: 11},
{data: 12},
{data: 13},
{data: 14}
],
colWidths: window.innerWidth*.12,
contextMenu: true,
currentRowClassName: "row_selected",
data: data,
fixedColumnsLeft: 1,
height: window.innerHeight - 32,
manualColumnMove: true,
manualColumnResize: true,
minSpareCols: 2,
minSpareRows: 80,
outsideClickDeselects: false,
persistentState: true,
rowHeaders: true,
stretchH: "last",
width: window.innerWidth
});</script>
but it dont work with emberjs handlebar template
i want to implement it in emberjs but i dont know how to add this in handlebar template ? i feel same problem when i tried to implement d3js for barchart ?
can i do it with “didInsert” of view object ?