Row Callback is removing expression when compiled? (Angular JS)
Row Callback is removing expression when compiled? (Angular JS)
Allan recently i told you , how to make angular directive clickable when used with datatables. Now, i am facing a problem with the rowcallback method.
rowCallback: function(row) {
if (!row.compiled) {
$compile(angular.element(row))($scope);
row.compiled = true;
} }
and i am using expression in my <a> tag like this in defaultContent of column.
<a ng-click="#{{expressionUrl}}">click me</a>
but when datatable is populated it eliminates the {{expressionUrl}} and only the # tag is visible.
<a ng-click="#"></a>
What is the solution of this problem? And how rowCallback function works in depth?
Answers
Answer is to use a render function instead of
DefaultContent
andhref tag
notng-click
.