daniel-nagy / fixed-table-header

Fixed table header directive.
MIT License
88 stars 36 forks source link

Not working with table header ng-repeat, Controller 'mdTable', required by directive 'mdRow', can't be found! #16

Open 2ernestkg opened 8 years ago

2ernestkg commented 8 years ago

Tried to use with table headers that are generated dynamically by ng-repeat

<thead fix-head md-head md-order="vm.order" md-on-reorder="vm.reorder">
            <tr md-row>
                <th ng-repeat="header in vm.tHeaders" md-column md-numeric="header.numeric"
                    ng-attr-flex="{{header.flex ? header.flex : ''}}"
                    ng-attr-md-order-by="{{header.order === false ? '' : header.field}}"
                    ng-attr-md-desc="{{header.desc}}" ng-hide="vm.showHideColumns && !header.visible">
                    <span translate>{{header.text}}</span>
                </th>
            </tr>
</thead>

On compile of header.clone, it is giving error Controller 'mdTable', required by directive 'mdRow', can't be found!

Maybe cause header.clone, contain only thead without table tag and directive md-table. So tried to compile appended version table.clone.append(header.clone)[0], compilation was successfull, but instead of populated th tags i see comment <--ngRepeat in header in vm.tHeaders-->

osmdawy commented 7 years ago

+1 the same issue

praveenraji2i commented 6 years ago

+1 the same issue

oviniciusfeitosa commented 6 years ago

+1 the same issue