作者:几米身边的孩子们 | 来源:互联网 | 2023-02-04 10:44
Myquestionissimilarasthisone,butinsteadofprependingrow,Iwantittoappend.我的问题和这个问题类似
My question is similar as this one, but instead of prepending row, I want it to append.
我的问题和这个问题类似,但我想要追加行,而不是在前面添加行。
This doesn’t work:
这不起作用:
app.directive('createTable', function ($compile) {
return {
link: function (scope, element, attrs) {
var cOntentTr= angular.element('test |
');
contentTr.parentNode.insertBefore(element, contentTr.nextSibling);
$compile(contentTr)(scope);
}
}
});
3 个解决方案