Suppose I have a table such that it adds rows when user click a button. The row adding code looks like this:
success: function (data, textStatus, jqXHR) {
$row = $('a#temp').parents('table').find('tr[id$=' + m + ']');
var $new_rows = $(data['payload'].join("\n"));
$row.after($new_rows);
}
Whereas the success is a non-angular callback function such that the ajax response has came back.
The payload will contain the HTML code along with the controller and directive inside the HTML.
I saw that the row is added correctly but I don't see the newly added row controller and directive get initialize.
Any suggestion is welcome.
Thanks