diff --git a/src/tooltip/test/tooltip.spec.js b/src/tooltip/test/tooltip.spec.js
index 91ebb81f26..350d89a9a4 100644
--- a/src/tooltip/test/tooltip.spec.js
+++ b/src/tooltip/test/tooltip.spec.js
@@ -96,6 +96,44 @@ describe('tooltip', function() {
tt.trigger( 'mouseleave' );
}));
+ it('should show correct text when in an ngRepeat', inject( function( $compile, $timeout ) {
+
+ elm = $compile( angular.element(
+ '
'+
+ '- '+
+ '{{item.name}}'+
+ '
'+
+ '
'
+ ) )( scope );
+
+ scope.items = [
+ { name: 'One', tooltip: 'First Tooltip' },
+ { name: 'Second', tooltip: 'Second Tooltip' }
+ ];
+
+ scope.$digest();
+
+ var tt_1 = angular.element( elm.find('li > span')[0] );
+ var tt_2 = angular.element( elm.find('li > span')[1] );
+
+ tt_1.trigger( 'mouseenter' );
+ tt_1.trigger( 'mouseleave' );
+
+ $timeout.flush();
+
+ tt_2.trigger( 'mouseenter' );
+
+ expect( tt_1.text() ).toBe( scope.items[0].name );
+ expect( tt_2.text() ).toBe( scope.items[1].name );
+
+ tooltipScope = tt_2.scope().$$childTail;
+ expect( tooltipScope.content ).toBe( scope.items[1].tooltip );
+ expect( elm.find( '.tooltip-inner' ).text() ).toBe( scope.items[1].tooltip );
+
+ tt_2.trigger( 'mouseleave' );
+
+ }));
+
it('should only have an isolate scope on the popup', inject( function ( $compile ) {
var ttScope;
diff --git a/src/tooltip/tooltip.js b/src/tooltip/tooltip.js
index 6bb486eeea..89715983a4 100644
--- a/src/tooltip/tooltip.js
+++ b/src/tooltip/tooltip.js
@@ -236,7 +236,8 @@ angular.module( 'ui.bootstrap.tooltip', [ 'ui.bootstrap.position', 'ui.bootstrap
removeTooltip();
}
tooltipLinkedScope = ttScope.$new();
- tooltip = tooltipLinker(tooltipLinkedScope);
+ tooltip = tooltipLinker(tooltipLinkedScope, angular.noop);
+ ttScope.$digest();
}
function removeTooltip() {