md-data-table icon indicating copy to clipboard operation
md-data-table copied to clipboard

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

Open hannupekka opened this issue 8 years ago • 19 comments

I'm getting this error with Safari 9 while newest Chrome works fine. Below is the template for my table.

<md-data-table-container class="md-whiteframe-z1">
  <table md-data-table>
    <thead>
      <tr>
        <th name="Group"></th>
        <th name="Name"></th>
        <th name="Description"></th>
        <th name="Created at"></th>
      </tr>
    </thead>
    <tbody>
      <tr ng-repeat="form in searchForms()">
        <td>{{ form.group }}</td>
        <td>{{ form.name }}</td>
        <td>{{ form.comment }}</td>
        <td>{{ form.created }}</td>
      </tr>
    </tbody>
  </table>
</md-data-table-container>

Any idea what is causing this? Using Browserify but I guess everything is required correctly since Chrome works.

hannupekka avatar Oct 13 '15 05:10 hannupekka

+1 I have same problem, I'm using md-data-table in md-tab, when I switch tabs I have this problem.

ebrahim-tadbir avatar Nov 16 '15 07:11 ebrahim-tadbir

I had this problem in Chrome after code minification. I've noticed that in the view an element before md-data-table-container had wrong closing tag.

  <h2 class="md-title" translate="SHOP_SELECT_LP_TO_ADD"></h1>

So I fixed it.

  <h2 class="md-title" translate="SHOP_SELECT_LP_TO_ADD"></h2>

And it's work for me. I didn't dig deeper. May it help.

grogone avatar Jan 11 '16 12:01 grogone

+1

PauloLira avatar Jan 26 '16 12:01 PauloLira

+1

pdore-netfore avatar Mar 07 '16 20:03 pdore-netfore

I keep getting the following in Chrome stable with 0.9.10 and 0.9.14:

Controller 'mdTable', required by directive 'mdCell', can't be found!

Still debugging in... seems to be an issue with md-data-table or our use of it though.

Splaktar avatar Mar 20 '16 01:03 Splaktar

@Splaktar are you using angular >=1.4.0. Also, if you are using ui-router this is a known issue #325.

daniel-nagy avatar Mar 20 '16 19:03 daniel-nagy

Yes, using Angular 1.4.8 or 1.5.x. Not using ui-router on this project just angular-route.

Splaktar avatar Mar 20 '16 20:03 Splaktar

Hello everyone, I have faced the same problem: Controller 'mdDataTable', required by directive 'mdTableRow', can't be found! On different versions of angular (1.5.X) there are different messages, but the root cause seems to be the same. Switching off animation does not helped.

LeonVay avatar Jun 10 '16 12:06 LeonVay

Happening for me too +1

Controller 'mdTable', required by directive 'mdCell', can't be found!

gustavogsimas avatar Jun 10 '16 17:06 gustavogsimas

:+1: Using ui-route

RooTooZ avatar Jun 15 '16 12:06 RooTooZ

+1

elekzalan avatar Jun 16 '16 10:06 elekzalan

+1 also using ui-router Controller 'mdTable', required by directive 'mdCell', can't be found!

tvm18860 avatar Jun 28 '16 00:06 tvm18860

I'm also experiencing the issue. Similar to @ebrahim-tadbir I am getting the issue when switching md-tabs.

paulhauner avatar Jul 01 '16 02:07 paulhauner

Has anyone had any luck overcoming this issue, or making a work around? I've been pulled onto updating an old project and we need some recent features of angular-material, which forces us to update angular beyond where md-data-table breaks. looking at angular 1.5.8 with ngRouter not ui-router. I have tried @mikedon's workaround from the other thread @daniel-nagy linked to above, at least in my case it wasn't appropriate. while it did remove the error, md-data-table stopped working. I also have an old minified md-data-table.min.js file of unknown version from the old server, while it doesn't throw the error, it still doesn't render correctly under the newer angular version. does anyone have any recommendations?

Maldris avatar Aug 09 '16 06:08 Maldris

I found that the reason the original version wasn't working was that I still had the newer css being pulled, reverting that made it draw fine for now, ideally I would like a suggested fix for this problem anyway so updates can be kept consistent.

Maldris avatar Aug 09 '16 06:08 Maldris

+1

DominicGaribaldi avatar Sep 20 '16 06:09 DominicGaribaldi

+1 same issue.

PManager1 avatar Oct 10 '16 03:10 PManager1

Check to see if your component or module is named "table" this is a reserved tag and will cause errors.

mattbajorek avatar Oct 25 '16 19:10 mattbajorek

Old topic, but not solved. Maybe this helps: https://github.com/daniel-nagy/md-data-table/issues/623#issuecomment-482099442

Kerimr avatar Apr 11 '19 12:04 Kerimr