I have the need to generate custom HTML by converting each data item returned for a given column when using Angular MVVM.
It seems that I can get the function called when it exists in the controller scope, but the HTML I return doesn't seem to be formatted in the column it just treats it as plain text.
{ "field": "note",
"title": "Notes",
width: "60%",
template: "<span ng-bind=formatNote(dataItem.note)>#= data.note# </span>"
}
$scope.formatNote = function(data) {
return data.replace(/ /g,"<p>");
};
It seems that I can get the function called when it exists in the controller scope, but the HTML I return doesn't seem to be formatted in the column it just treats it as plain text.
{ "field": "note",
"title": "Notes",
width: "60%",
template: "<span ng-bind=formatNote(dataItem.note)>#= data.note# </span>"
}
$scope.formatNote = function(data) {
return data.replace(/ /g,"<p>");
};