Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using URL string for headerCellTemplate does not work #5717

Closed
jgunderson-IAS opened this issue Oct 3, 2016 · 2 comments
Closed

Using URL string for headerCellTemplate does not work #5717

jgunderson-IAS opened this issue Oct 3, 2016 · 2 comments

Comments

@jgunderson-IAS
Copy link

jgunderson-IAS commented Oct 3, 2016

I have an issue with header cell templates not displaying if I try and use a URL string that should fetch the template. The network tab shows it has been loaded yet the header cell will not show content. If I use inline html it works fine. Here is a plunkr to show what is happening:

http://plnkr.co/edit/b0MNuXPgn485N1HyHjQC?p=preview

The first column in columnDefs has a url and the second has inline html. Any help would be much appreciated.

@csvan
Copy link
Contributor

csvan commented Oct 4, 2016

Possible dup of #4514

You can work around this issue (at least I did) by injecting the html in question into your template cache.

@david-hanger
Copy link

Since I recently had a similar problem trying to use a URL value for filterHeaderTemplate (and getting empty content), I posted a comment with a recommended fix to the pull request #5311. I thought I'd reference that comment here, in case anyone else comes across this before a better fix is applied.

The above recommended workaround is basically to prefetch the template into $templateCache before defining the gridOptions. My recommendation in the pull request fixes template URL values to work as expected (as they do for cellTemplate and some others) without requiring such a prefetch.

falsyvalues added a commit to falsyvalues/ui-grid that referenced this issue Oct 11, 2017
…r-cell`, `filter`.

Fixes issues angular-ui#4744, angular-ui#5717, angular-ui#5115, angular-ui#5196, angular-ui#5712, angular-ui#5260, angular-ui#5196, angular-ui#4851, angular-ui#4514, angular-ui#5601

For URL-based templates we need to be sure that content arrived before `$compile` and `$elm.append` call.
mportuga pushed a commit that referenced this issue Oct 31, 2017
…r-cell`, `filter`.

Fixes issues #4744, #5717, #5115, #5196, #5712, #5260, #5196, #4851, #4514, #5601

For URL-based templates we need to be sure that content arrived before `$compile` and `$elm.append` call.
vishalnarewade pushed a commit to vishalnarewade/ui-grid that referenced this issue Nov 6, 2017
…r-cell`, `filter`.

Fixes issues angular-ui#4744, angular-ui#5717, angular-ui#5115, angular-ui#5196, angular-ui#5712, angular-ui#5260, angular-ui#5196, angular-ui#4851, angular-ui#4514, angular-ui#5601

For URL-based templates we need to be sure that content arrived before `$compile` and `$elm.append` call.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants