jquery - I couldn't select tr's with ng-repeat inside tbody of the table? -


i trying write directive table angularjs , selecting table > tr resulting first row of table. tr's inside tbody not included in result.when remove ng-repeat="header in headers" statement

<table>     <thead>         <tr>             <th ng-repeat="header in headers">{{header}}</th>         </tr>     </thead>     <tbody>         <tr ng-repeat="header in headers">   // removed ng-repeat select rows             <td ng-repeat="header in headers">{{header}}</td>         </tr>     </tbody> </table> 

all rows of table selected .i can see 4 tr objects console.log. how can select rows inside table in directive linking function? time.

here plnk: http://plnkr.co/edit/fvvc85

compile : function($element, $attrs){     return function(scope,element,attrs){         settimeout(function() {              console.log(element.find('tbody').children());         },100);      }; } 

move code timeout function.


Comments

Popular posts from this blog

PySide and Qt Properties: Connecting signals from Python to QML -

c# - DevExpress.Wpf.Grid.InfiniteGridSizeException was unhandled -

scala - 'wrong top statement declaration' when using slick in IntelliJ -