-
Notifications
You must be signed in to change notification settings - Fork 6.7k
"Remove tab" problem #5
Comments
Hi max, I'm currently redoing this right now. I'll push it later today. |
Try the new build. Tabs are different now, with a simpler layout and a template being used. This is the direction all of the directives are going. |
My tab template didn't see root scope. Maybe I do something wrong. Please add some documentation. <tabs> {{lang.name}} shows as text, not variable <div class="tab-pane" ng-class="{active: selected}" ng-show="selected" ng-transclude> lang.name didn't shows |
If I set .. scope : true ... in pane directive, values shows. It correct solution? |
Reproduce scenario for the title not interpolated: http://plnkr.co/edit/1Ea4ni?p=preview @ajoslin, any ideas? It looks like isolated scope + @ + ng-repeat issue |
Bizarrely, sometimes it does seem to interpolate ok. On 16 October 2012 22:03, Pawel Kozlowski notifications@github.com wrote:
|
Yeh, under debugger I can see that the first interpolation is OK, then it |
Thanks for looking into this more Pawel, been busy. It does work if we manually $watch interpolation on the parent scope: http://plnkr.co/edit/CWlsvA?p=preview But this seems to basically be what angular core does too.. it sets up an $observe and makes the scope of it be the parent. Not sure.. |
I wonder if this isn't some other issue related to AngularJS + TemplateURL. When using a string supplied template this issue does not seem to appear. See: http://plnkr.co/edit/PJirWI?p=preview I haven't looked at AngularJS directly, but hopefully this helps you narrow down the cause. |
@johlrich Awesome, how did you figure this out? Is it sth you've bumped into before? I think I saw an issue opened for sth similar on the angular.js side but I can't find it... |
There is a similar issue opened: angular/angular.js#906 |
Thanks to all, without using "templateUrl" all works good |
@pkozlowski-opensource I had seen/used a similar implementation of bs-tabs (which was just https://github.com/CaryLandholt/AngularFun/blob/master/src/scripts/directives/tabs.coffee#L32 minus the CoffeeScript) in my first sandbox apps when figuring out angular. Literally the only difference is back then I was using RequireJS's Text plugin to bundle my templates as strings rather than as templateUrl's so I never ran across this issue. Seeing that being the only diff made me try it out on plunker. Glad it helped. |
Nice find @johlrich ! The question is how will we fix this? |
I have seen problems with templateUrl before and I wonder if actually there ... sent from my tablet
|
Hmm, it is either a bug on the AngularJS side or some serious lack of knowledge on our side. To see what is going on we should try to prepare a minimal reproduce scenario. But yeh, it is kind of strange that it works with the inlined template but not with the templateUrl, The only difference I can see is the additional call to $http. |
There is a huge difference in the code that runs between template and In the case of template, see compile.js - lines On 17 October 2012 18:21, Pawel Kozlowski notifications@github.com wrote:
|
Yes! Same conclusion here, this seems to be a completely different path in In the meantime the question remains: do we "fix" it (by either using a |
OK, so we are not the first one bumping into this issue: and the jsFiddle that reproduces this: http://jsfiddle.net/WAN2e/1/ There are number of issues for it already (with more jsFiddle examples): but honestly I can't pinpoint what is going on here :-( |
Narrowed it down to a (almost) minimal reproduce scenario: http://jsfiddle.net/52nrQ/9/ It looks like it has nothing to do with transclusion, it is some combination of ng-repeat + @ + templateUrl |
We can narrow it down a bit more, even: http://jsfiddle.net/52nrQ/10/ |
So, does is qualify as an issue? I know that those guys are under pressure now and Misko will probably close this one but we can always try :-) |
This is so definitely an issue. I think they would listen even more if we On 21 October 2012 17:07, Pawel Kozlowski notifications@github.com wrote:
|
Yes, we should try to fix it. Not sure how...! |
Here is a comprehensive plnk: http://plnkr.co/edit/xgVRAs?p=preview. It On 21 October 2012 17:20, Andy Joslin notifications@github.com wrote:
|
I've been sniffing around today with this. And as I was refreshing browser, the titles showed up... and then remembered Petes comment 'Bizarrely, sometimes it does seem to interpolate ok'. To me it smells like an async problem and the tab title somehow gets lost in the shuffle and weirdly the content shows up. |
OK guys, good news: the strange interpolation problem turned out to be a bug in AngularJS and was fixed today by Igor. Here is more info:
I've tested this on the accordion and the patch provided by Igor fixes the issue. We will just need to wait for the new AngularJS release now. |
Sweet From: Pawel Kozlowski notifications@github.com OK guys, good news: the strange interpolation problem turned out to be a bug in AngularJS and was fixed today by Igor. Here is more info: |
Now when 1.0.3 was released we will be able to add proper title support for both tabs and accordion (!). |
Yay :-) |
I believe that this is fixed now after switching to 1.0.3! |
chore(stuff): add grunt/bower/npm/karma infrastructure
…m release/0.13.4-1 to develop * commit 'd8cf1e8f92f8a579642fbe3d9ad4e002cf29c93a': chore(package): release new custom version 0.13.4-1
Didn't removes tab after removing item from array. Content removes correctly
The text was updated successfully, but these errors were encountered: