kendo-labs/angular-kendo

kendo grid footerTemplate not supported in angular?

DataPrintGrafik opened this issue · 2 comments

Hi, i tried to use footerTemplate in kendo grid, but angular directives seem not working:

var customizeButtonTemplate = '<a id="grdKeysCustomizeButton" class="k-button k-button-icontext" href="\\#" ng-show="User.Options.AllowUserInterfaceCustomization" ng-click="ShowUserInterfaceSettings('DocumentDetails', 'grdKeys')"><span class="k-icon k-edit"></span>{{'DocumentDetails.CustomizeGridButton' | translate}}</a>';

var cols = [{ field: 'Value', title: 'Value', footerTemplate: customizeButtonTemplate }]
$scope.grdKeysOptions = {
  ...
  ...
  columns = cols;
}

footerTemplate is not supported?
i'm forced to use $compile?

thanks

footerTemplate is supported since issue #330, but your code seems to be broken (too many levels of nested quoting makes it hard to write such a template in JavaScript). My suggestion is to write the template in a <script> tag and use jQuery's html() method to fetch the content:

<script type="x/template" id="my-template">
  <a href="...">... your template here</a>
</script>

and in JS: footerTemplate: $("#my-template").html()

thanks you solved my problem! updated to lastest versione of angular-kendo!!