4

I'm using ng-bind-html in a table cell and I want the cell not to collapse when the binded value is an empty string ('').

So I bind to: value || ' '

This works well on Crome and FF but fails on IE. If I check the source code on IE, it appears as a white-space.

Here's my fiddle showing this bug:

http://jsfiddle.net/Yq85R/8/

Thanks

The Kline
  • 43
  • 3

1 Answers1

1

It is a CSS style issue:

Try this:

table td{
    border:1px solid;
   white-space: pre; 
}

Here is a sample fiddle:

http://jsfiddle.net/Yq85R/10/

What white-space: pre does is to preserved whitespace.

Here is the documentation associated with this issue:

http://msdn.microsoft.com/en-us/library/ie/ms531182(v=vs.85).aspx

Dalorzo
  • 19,834
  • 7
  • 55
  • 102