Skip to content
This repository has been archived by the owner on Feb 18, 2024. It is now read-only.

Error: [$compile:ctreq] Controller 'mdTable', required by directive 'mdCell', can't be found! #623

Open
mattweason opened this issue Sep 27, 2017 · 3 comments

Comments

@mattweason
Copy link

I'm having an issue when I try to use md-virtual-repeat-container with md-data-table. When the page loads it throws an error:

Error: [$compile:ctreq] Controller 'mdTable', required by directive 'mdCell', can't be found!

And the first row of the table only has 2 cells. The rest of the rows load fine. My html is below along with a photo.

<md-table-container md-virtual-repeat-container>
    <table md-table md-row-select ng-model="selected" md-progress="promise">
        <thead md-head md-order="query.order" md-on-reorder="getData" fix-head>
            <tr md-row>
                <th md-column md-order-by="{{key}}" ng-repeat="(key, col) in columns">{{col}}</th>
            </tr>
        </thead>
        <tbody md-body>
            <tr md-row md-select="p" md-select-id="name" md-auto-select md-virtual-repeat="p in tableContent">
                <td md-cell ng-repeat="(key, col) in columns">{{p[key]}}</td>
            </tr>
        </tbody>
    </table>
</md-table-container>

md-data-table-bug

This error occurs on several datatables in my platform but not all, and not consistently.

@lehno
Copy link

lehno commented Jan 31, 2018

Same problem here, have you found a solution?

@GaurangRLB
Copy link

Is there any update regarding this issue? Same problem with V 0.10.9

@Kerimr
Copy link

Kerimr commented Apr 11, 2019

Had the same error. Could fix it by removing a ng-if from table cell (and move it inside the cell). So - in my case - the error occured when there was a cell missing. Maybe that helps

<td md-cell">
         <md-icon ng-if="row.status === 'Error'">battery_alert</md-icon>
</td>

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants