-
Notifications
You must be signed in to change notification settings - Fork 6.7k
Remove a need for a child scope in tooltips / popovers #1269
Comments
@Sinetheta as answered on SO it is really how AngularJS works at the moment - that is, child scopes are treated the same way as isolated scopes. There is not much we can do about it, the only work-arround you can use for now is to put a tooltip on a separate DOM element. What we could do, though, is to remove a need for a child scope in a tooltip which is technically possible. I'm renaming this issue to reflect this. Having said the above, removing a need for an isolated scope is not a trivial task so this won't happen overnight. |
Thanks @pkozlowski-opensource, it's kind of sad that Angular works that way, and even more bizarre that it's inconsistent between browsers. |
@Sinetheta For the inconsistency between browsers - it should be taken with the AngularJS team itself. Getting scoping right is not a trivial problem and I'm not surprised that it takes time to settle this design / implementation in AngularJS. What we can do in this project is to remove a need for the isolated scope in this project and this is why I've changed issue name. |
Another instance of the same issue: #1497 |
The treatment of isolate scopes has changed in AngularJS 1.2 (see angular/angular.js@909cabd) , we can now reconsider removing the child scope. |
tt_ scope variables are now in the ttScope which is specific to each tooltip directive (multiple tooltip directives can now run on the same element). This allows tooltips to be used alongside any directive that may or may not require different scope types. Closes angular-ui#1269 Fixes angular-ui#2320 Fixes angular-ui#2203
tt_ scope variables are now in the ttScope which is specific to each tooltip directive (multiple tooltip directives can now run on the same element). This allows tooltips to be used alongside any directive that may or may not require different scope types. Closes angular-ui#1269 Fixes angular-ui#2320 Fixes angular-ui#2203
tt_ scope variables are now in the ttScope which is specific to each tooltip directive (multiple tooltip directives can now run on the same element). This allows tooltips to be used alongside any directive that may or may not require different scope types. Closes angular-ui#1269 Fixes angular-ui#2320 Fixes angular-ui#2203
I've created a SO question regarding this behaviour, but I think it qualifies as an issue.
When using tooltip from the Angular UI on an element which is also using directive that asks for an isolated scope, eg:
I get the following error in Firefox but not in Chrome:
Which is odd because I wouldn't expect a tooltip to ask for an isolated scope. It's my understanding this line in the source says that the directive does not ask for an isolated scope, and that only the popup which gets injected at the bottom of the page does.
Isn't this bad? Why is this error only showing up in Firefox?
The text was updated successfully, but these errors were encountered: