<md-tooltip> not added to <md-dummy-tab> because it does not display HTML code inside <md-tab-label> . Its template is added to the nearest parent <md-content> at the time the tooltip starts.
scope.$watch('visible', function (isVisible) { if (isVisible) showTooltip(); else hideTooltip(); });
-
function showTooltip() { // Insert the element before positioning it, so we can get the position // and check if we should display it tooltipParent.append(element); // Check if we should display it or not. // This handles hide-* and show-* along with any user defined css if ( hasComputedStyleValue('display','none') ) { scope.visible = false; element.detach(); return; } positionTooltip(); angular.forEach([element, background, content], function (element) { $animate.addClass(element, 'md-show'); }); }
-
current = getNearestContentElement(), tooltipParent = angular.element(current || document.body)
-
function getNearestContentElement () { var current = element.parent()[0];
Bartลomiej T. Listwon
source share