-
Notifications
You must be signed in to change notification settings - Fork 6.7k
Dynamic list of tabsets in 0.5.0 #783
Comments
a error happens if add active property on the tab to: http://plnkr.co/edit/kAc1C6?p=preview
|
Appears to a be an issue with https://github.com/angular-ui/bootstrap/blob/master/src/tabs/tabs.js#L307:
The problem appears to be that tabsetCtrl.$scope is set in the compile phase of tabset. Which means, tabsets can no longer be generated dynamically (because the compile phase happens once). Is this intended to be a supported feature @ajoslin? EDIT: The above is based on the assumption that ng-repeat doesn't recompile every time it watches an object for changes. If ng-repeat is simpy cloning and adding an index hash to each object iteration, then it won't recompile, which means the tabset compile stage gets skipped. |
Ergh, sorry. I should have looked at tabsetTitles better bfeore merging it, it kind of was rushed in. |
Hmm.. that is in the linking function. I don't think that line specifically is the problem. Looking into this now |
@dtelaroli your error is happening because '!active' is not an assignable expression. When we upgrade to angular 1.2 we will get better errors for that. |
http://plnkr.co/edit/lw1PS6rpe7xXNfZXN3xR?p=preview With the ng-repeat, the I added a setTimeout and it works - check line 2676 of ui-bootstrap.js on the plunker. To actually fix it, I will have to try a few more things .. another day |
thanks @ajoslin |
thanks @ajoslin for the temporary solution. I really appreciatee it! |
Yes - thank you for the temporary solution.. However, the solution results in the tabs being underneath the content (your plnkr example shows the problem). Any update on the fix or is there another fix to get the tabs above the content? Thanks! |
here is a small css hack to use with this one : #783 (comment) it's putting back the tabs above the content. .tabbable {
position: relative;
padding-top: 40px; /* height of the tabs */
}
.tabbable .nav-tabs {
position: absolute;
top: 0;
} |
Could this be related to angular/angular.js#2064? |
same problem here, but it worked great in development untill i did precompile on production and saw this error |
Hi @ajoslin Have you think about a definitive solution of this matter? I have tried your solution but the tabs now are underneath the content and even if i tried the @desgnl css hack, it is not working for me anymore.. I would like to have again the version 0.4.0 but unfortunately that version does not fit anymore in other requirements in my project. |
@ajoslin do you have a reference to a bug in AngularJS that might be the root cause of this one? If so I could try to "lobby" for its faster resolution. I'm looking at the issue right now but I'm totally puzzled by what is going on, as I fail to understand why the linking function of the nested tabset is not executed.... |
It is because templateUrl directives are evaluated asynchronously and in a different order, so a timeout fixes the asynchronous problem of directives not loading in time. I can find the issue later, it is the one where vojta posted a PR for $compile recently ... It may be merged already. — On Tue, Oct 1, 2013 at 9:54 AM, Pawel Kozlowski notifications@github.com
|
What's the solution for this? We need tabs in our application and this is really throwing a wrench in the gears. |
we're just using bootstrap proper for things that don't work in ui-bootstrap, like this issue. mix-n-match |
The problem here is that our app is fully angular and we don't want to use On Mon, Oct 7, 2013 at 10:58 AM, Tyler Renelle notifications@gh.neting.ccwrote:
"If at first you don't succeed, use a bigger hammer." - Unofficial motto of |
It looks like it will be fixed in 1.2.0: angular/angular.js#3927 |
Yeah, I just saw this and trying to build it for general use.
|
Okay, seems to have resolved the error, but my tabs are still not showing To use with your bower.json, include this: "devDependencies": { On Mon, Oct 7, 2013 at 1:56 PM, Michel Boudreau michelboudreau@gmail.comwrote:
"If at first you don't succeed, use a bigger hammer." - Unofficial motto of |
I had similar issue using tabs inside of ng-if directive - tabsetTitles postlink function ran before tabset link function, so i moved tabset link to pre-link and with angular-1.2.0-rc.3 it worked. plunker with problem: plunker with fix: |
I'll mention that @daa's update resolves embedded tabs as well: http://plnkr.co/edit/sziarc?p=preview |
This reverts commit 220e7b6. Revert the capability to set the tab direction. This is no longer a feature in Bootstrap 3 and breaks nested tabs. Closes angular-ui#783 Relates to angular-ui#659
This reverts commit 220e7b6. Revert the capability to set the tab direction. This is no longer a feature in Bootstrap 3 and breaks nested tabs. Closes angular-ui#783 Relates to angular-ui#659
Repeating a dynamic list of tabsets breaks in 0.5.0 while working as expected in 0.4.0.
0.4.0 - Working:
http://plnkr.co/edit/tPVbfa9lI1CarrDS171p?p=preview
0.5.0 - "Cannot read property '$parent' of undefined"
http://plnkr.co/edit/er6lg52FYHn4AyRF5kSm?p=preview
The text was updated successfully, but these errors were encountered: