daniel-nagy / fixed-table-header

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

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

Open egantz opened 8 years ago

egantz commented 8 years ago

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

daniel-nagy commented 8 years ago

Have you tried reproducing this in a Codepen?

leocaseiro commented 8 years ago

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

egantz commented 8 years ago

@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? :)

daniel-nagy commented 8 years ago

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.

jraadt commented 8 years ago

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

leocaseiro commented 8 years ago

I've tried too, not luck.

jraadt commented 8 years ago

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.

lucasmaj commented 8 years ago

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

egantz commented 7 years ago

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

panickerr commented 7 years ago

@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.

mikila85 commented 7 years ago

same here please fix..

mennya commented 7 years ago

It works this ng-show

leocaseiro commented 7 years ago

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

egantz commented 7 years ago

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

jrcollins4 commented 7 years ago

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

oviniciusfeitosa commented 6 years ago

Didn't work for me too...