0
votes

I need to inject an img link into some column headers. All of these headers have drop down filtering on them. Via this site towards the bottom: https://github.com/angular-ui/ui-grid/wiki/Templating

When I use that for the cell template on 1 column for testing and click the header name I'm getting the error:

TypeError: v2.sort is not a function
    at fn (eval at compile (angular.js:15156), <anonymous>:4:241)
    at e (angular.js:26744)
    at m.$eval (angular.js:17972)
    at m.$apply (angular.js:18072)
    at HTMLDivElement.<anonymous> (angular.js:26749)
    at cg (angular.js:3613)
    at HTMLDivElement.d (angular.js:3601)

The column, even before the error, doesn't have the drop down arrow for sorting and doesn't have the dropdown filter either. How do I get that? It's almost like this isn't the default template?

1

1 Answers

0
votes

Crap, seems that was the wrong template. I used the one here and it worked:

https://github.com/angular-ui/ui-grid/blob/master/src/templates/ui-grid/uiGridHeaderCell.html

What's interesting is that if I move this to it's own html file it says it's:

fetching url Views/CustomHeaderCellTemplate.html

but the header is blank like it didn't work. Not sure why that would be.