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

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

Open
hannupekka opened this issue Oct 13, 2015 · 19 comments

Comments

@hannupekka
Copy link

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.

@ebrahim-tadbir
Copy link

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

@grogone
Copy link

grogone commented Jan 11, 2016

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.

@PauloLira
Copy link

+1

1 similar comment
@pdore-netfore
Copy link
Contributor

+1

@Splaktar
Copy link

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.

@daniel-nagy
Copy link
Owner

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

@Splaktar
Copy link

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

@LeonVay
Copy link

LeonVay commented Jun 10, 2016

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.

@gustavogsimas
Copy link

Happening for me too +1

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

@RooTooZ
Copy link

RooTooZ commented Jun 15, 2016

👍 Using ui-route

@elekzalan
Copy link

+1

@tvm18860
Copy link

tvm18860 commented Jun 28, 2016

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

@paulhauner
Copy link

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

@Maldris
Copy link

Maldris commented Aug 9, 2016

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
Copy link

Maldris commented Aug 9, 2016

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.

@DominicGaribaldi
Copy link

+1

@PManager1
Copy link

+1 same issue.

@mattbajorek
Copy link

mattbajorek commented Oct 25, 2016

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

@Kerimr
Copy link

Kerimr commented Apr 11, 2019

Old topic, but not solved. Maybe this helps:
#623 (comment)

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