md-data-table
md-data-table copied to clipboard
html format
How to show correctly text with some simple html format (e. g: \n
for line break)?
I am using filter with trustAsHtml
such as below, but it does not work, while if I am using non md-data-table, it works.
.filter('unsafe', function ($sce){
return function (val) {
return $sce.trustAsHtml(val);
}
})
I have similar requirement as you about put a html into a cell. What I did is expose $sce.trustAsHtml to scope and use it in view.
You can check this stackoverflow.