-
Notifications
You must be signed in to change notification settings - Fork 6.7k
<tabset> error when inside an ng-switch-when #1215
Comments
Seems like this is caused by the exact same thing as Issue #1216 i just opened: tabset does some trickery with the $parent causing a range of weirdness. This is just very quick theory, could be that ng-switch-when is throwing that error and not tabset. |
Apparently not. Using Chrome's Developer Tools, I traced the exception to this:
inside ui-bootstrap-tpls.js. It's the tabsetCtrl.$scope.$parent which is undefined. I really haven't studied the code yet to understand what's going on. |
If child scopes created by ng-switch mess with a logic of the tabsetCtrl, you can try this:
|
@buberdds thanks for helping out! I tried your suggestion but the tabs aren't rendering correctly when there are more than one. Instead of having "tabs", its rendering it vertically like a list. But, still, thank you again!
|
Well...ng-switch now breaks down css rules ;) all .nav-tabs rules use child selectors ">", you can remove them: ''' .nav-tabs li { .nav-tabs li a, .nav-pills li a { .nav-tabs li a { ps. it's better to use class selectors instead of element selectors. |
This got fixed in 0.8.0: http://plnkr.co/edit/TinaPrLODfOJDSELpcT1?p=preview |
Hi, am getting a TypeError: Cannot read property '$parent' of undefined, when the is inside an ng-switch-when:
Plunkr here: http://plnkr.co/edit/ZDPAUaDJv93nuRqCDHKH?p=preview
The text was updated successfully, but these errors were encountered: