ui-grid icon indicating copy to clipboard operation
ui-grid copied to clipboard

Header template not working as advertised

Open tedhohio opened this issue 11 years ago • 8 comments

I used the cellTemplate referencing an external HTML file and everything worked fine. When I attempted to use the headerCellTemplatereferencing an external HTML file, I got a console error that the template.replace function failed.

However, when I cut and pasted the HTML from the external file and entered it into a javascript variable, then referenced the variable for the headerCellTemplate, it worked.

tedhohio avatar Feb 23 '15 17:02 tedhohio

What version of ui-grid as you using? Also, can you reproduce in a plunker?

I checked using this plunker and it appears to work fine: http://plnkr.co/edit/7GcnaR?p=preview

c0bra avatar Feb 23 '15 18:02 c0bra

I'm using ui-grid - v3.0.0-rc.19 - 2015-02-11. Haven't tried to reproduce in plunker, but will try that later. I double-checked my code and still the reference to the external HTML still produces the template.replace error, while the reference to a variable that contains the exact copy of the HTML works.

Ted

On Mon, Feb 23, 2015 at 1:47 PM, Brian Hann [email protected] wrote:

What version of ui-grid as you using? Also, can you reproduce in a plunker?

I checked using this plunker and it appears to work fine: http://plnkr.co/edit/7GcnaR?p=preview

— Reply to this email directly or view it on GitHub https://github.com/angular-ui/ng-grid/issues/2833#issuecomment-75605184.

tedhohio avatar Feb 23 '15 21:02 tedhohio

Can you paste the value of your headerCellTemplate?

c0bra avatar Feb 24 '15 14:02 c0bra

Here is the HTML string used for the variable: The only difference between it and the separate HTML file is I removed any extraneous whitespace.

var myHeader = " "

On Tue, Feb 24, 2015 at 9:50 AM, Brian Hann [email protected] wrote:

Can you paste the value of your headerCellTemplate?

— Reply to this email directly or view it on GitHub https://github.com/angular-ui/ng-grid/issues/2833#issuecomment-75769733.

tedhohio avatar Feb 24 '15 15:02 tedhohio

I think a plunker is probably the right way to diagnose this - could you modify Brian's plunker to illustrate the problem?

PaulL1 avatar Feb 25 '15 18:02 PaulL1

@PaulL1 @tedhohio I've made a plunker here doing what ted's trying to do: http://plnkr.co/edit/aFmOtw?p=preview Seems fine to me.

c0bra avatar Feb 27 '15 15:02 c0bra

No response in 2 weeks. Closing.

c0bra avatar Mar 13 '15 15:03 c0bra

I am having this issue too. It seems to effect v3 and upwards. If you check those plunkers they no longer work.

ShaneF67 avatar Jan 16 '17 12:01 ShaneF67