fixed-table-header icon indicating copy to clipboard operation
fixed-table-header copied to clipboard

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

Open egantz opened this issue 9 years ago • 16 comments

tried to insert the fix-head directive where the md-head is and I get this error: [$compile:ctreq] Controller 'mdTable', required by directive 'mdColumn', can't be found!

What am I doing wrong?

Using md-data-table v0.9.14

egantz avatar Mar 22 '16 08:03 egantz

Have you tried reproducing this in a Codepen?

daniel-nagy avatar Mar 22 '16 15:03 daniel-nagy

I'm having the same issue.

I realized that because I'm using ui-router.

I simulate using ng-if and I could reproduce the same error: http://plnkr.co/edit/gb6MIbwF3lCXhx9GUCvZ

I believe if we fix with ng-if, it'll fix for ui router and so on.

UPDATE: What is interesting is if we remove the fix-head directive, the header shows on ng-if without any errors/warnings

leocaseiro avatar Mar 29 '16 03:03 leocaseiro

@leocaseiro Exactly. I am using ui-router in my app as well and I guess this is the reason why I couldn't reproduce this issue on codepen before. haven't thought ``ui-router` would cause the clash.

@daniel-nagy any ideas? :)

egantz avatar Mar 30 '16 07:03 egantz

The fix-head directive doesn't work with ng-if at the moment. If I can find a way to make it work with ng-if it might fix this issue.

daniel-nagy avatar Mar 30 '16 14:03 daniel-nagy

Yep I believe this is a duplicate of #7 . I've tried to fix it to no avail... :(

jraadt avatar May 17 '16 04:05 jraadt

I've tried too, not luck.

leocaseiro avatar May 17 '16 06:05 leocaseiro

I now have it working in my pull request #15 where a table's parent element can have an ng-if. I reworked fixed-table-header to use Angular Material's $mdSticky service, taking cues from md-subheader. Hope this helps.

jraadt avatar May 20 '16 15:05 jraadt

Sill experiencing this issue. Was there ever a permanent fix?

lucasmaj avatar Jun 24 '16 15:06 lucasmaj

Still happens, couldn't get to make it work :(

egantz avatar Jul 10 '16 15:07 egantz

@daniel-nagy Even i tired many fixes that were suggested in your Gist and what i knew but the header failed to remain static. Also when i use fix-head in the md-data-tables then the header name disappears.

panickerr avatar Jul 27 '16 12:07 panickerr

same here please fix..

mikila85 avatar Sep 22 '16 14:09 mikila85

It works this ng-show

mennya avatar Nov 08 '16 12:11 mennya

Has Anyone tried to implement with https://github.com/soenkekluth/sticky-state ?

leocaseiro avatar Nov 16 '16 03:11 leocaseiro

@leocaseiro Yeah, didn't work for me. If anyone succeeds, please share. 👍🏻

egantz avatar Jan 10 '17 08:01 egantz

Running into this issue as well. Using this with md-data-table v 0.9.4.

jrcollins4 avatar Feb 10 '17 21:02 jrcollins4

Didn't work for me too...

oviniciusfeitosa avatar Oct 24 '17 20:10 oviniciusfeitosa