지시문과 함께 <tr>
요소 내부에서 ng-repeat를 사용하고 있습니다.AngularJS - 지시어 내에서 각 반복 반복에 요소 추가
HTML :
<tbody>
<tr ng-repeat="row in rows" create-table>
<td nowrap ng-repeat="value in row | reduceString>{{value}}</td>
</tr>
</tbody>
지침 : 나는 각 반복에 대한 새로운 <tr>
요소를 추가 할 수 있지만 그것이에 추가 된 후
app.directive('createTable', function() {
return {
link: function (scope, element, attrs) {
var contentTr = scope.$eval('"<tr ng-show="false"><td>test</td></tr>"');
$(contentTr).insertBefore(element);
}
}
}
);
, 나는 실행 된 각 코드를 얻을 수 아니에요 DOM (예 : <tr>
내부의 ng-show). 나는 명백한 것을 놓치고 있는가?