Hi there!
We are using NPM and webpack to build own apps. All still working except when we try to call any required function from the template string due the scope of that.
How can we call foo function in this example?
<
p
>import { foo } from "../utilities/foo";<
br
></
p
><
p
>let template = require("html!../../templates/details/research-detail-template.html");<
br
></
p
><
p
>$('#onlineshop-orders-grid').kendoGrid({<
br
> dataSource: dataSrc,<
br
> height: fullHeight,<
br
> sorteable: true,<
br
> pageable: true,<
br
> columnMenu: true,<
br
> selectable: 'multiple, row',<
br
> allowCopy: { delimeter: ';' },<
br
> filterable: { mode: "row" },<
br
> rowTemplate: kendo.template( template )</
p
><
p
>});<
br
></
p
>
And the template contains: <button onclick="foo()">Foo plz!</button>
(if I declare the function as global.foo works... but don't want do that)