|
<template>
<ej-grid e-data-source.two-way="gridData" e-details-template="#template" >
</ej-grid>
<script id="template" type="text/template">
<div class="tabcontrol" id="Test">
<span>${EmployeeID}</span>
</div>
</script>
</template> |
Ok, so I am closer to where I need to be. However, the data context is EMPTY from inside the template. Is there anything that needs to be done in the .js view model on the click event to get my data to show up?
So currently I'm trying this, and with the "text/x-jsrender" along with the {{:payload.ApprovalState}} shows that the payload variable has data, yet this aurelia style shows payload is empty :
|
import {inject, TemplatingEngine} from 'aurelia-framework';
@inject(TemplatingEngine)
export class Grid {
constructor(templatingEngine) {
this.templatingEngine = templatingEngine;
this.template = "#template"
}
letsEnhance(elem) {
let view=this.templatingEngine.enhance(elem);
view.attached();
}
databound(e) {
this.letsEnhance(e.detailsElement[0]);
}
}
<template>
<div>
<ej-grid e-data-source.two-way="gridData" e-details-template="#template" e-on-details-data-bound.delegate="databound($event.detail)">
<ej-column e-field="OrderID" e-header-text="Order ID" e-text-align="right"></ej-column>
</ej-grid>
</div>
<script id="template" type="text/x-jsrender">
<div class="col">
Status: {{>name.firstName}}
</div>
<div class="col">
Amount: {{:Freight /100}}
</div>
<a class="external-link" rel='nofollow' href.bind="{{>name.firstName}}">Blog</a>
<div show.bind="{{:Verfied}}">
Hello, World!
</div>
</script>
</template> |