@@ -36,9 +36,9 @@ angular.module( 'ui.bootstrap.tooltip', [ 'ui.bootstrap.position', 'ui.bootstrap
3636 * $tooltipProvider.options( { placement: 'left' } );
3737 * });
3838 */
39- this . options = function ( value ) {
40- angular . extend ( globalOptions , value ) ;
41- } ;
39+ this . options = function ( value ) {
40+ angular . extend ( globalOptions , value ) ;
41+ } ;
4242
4343 /**
4444 * This allows you to extend the set of trigger mappings available. E.g.:
@@ -202,7 +202,7 @@ angular.module( 'ui.bootstrap.tooltip', [ 'ui.bootstrap.position', 'ui.bootstrap
202202
203203 // And show the tooltip.
204204 ttScope . isOpen = true ;
205- ttScope . $apply ( ) ; // digest required as $apply is not called
205+ ttScope . $digest ( ) ; // digest required as $apply is not called
206206
207207 // Return positioning function as promise callback for correct
208208 // positioning after draw.
@@ -289,7 +289,6 @@ angular.module( 'ui.bootstrap.tooltip', [ 'ui.bootstrap.position', 'ui.bootstrap
289289 }
290290
291291 var unregisterTriggers = function ( ) {
292- element . unbind ( triggers . show , toggleTooltipBind ) ;
293292 element . unbind ( triggers . show , showTooltipBind ) ;
294293 element . unbind ( triggers . hide , hideTooltipBind ) ;
295294 } ;
@@ -341,29 +340,11 @@ angular.module( 'ui.bootstrap.tooltip', [ 'ui.bootstrap.position', 'ui.bootstrap
341340 } ] ;
342341} )
343342
344- . directive ( 'tooltipTemplateTransclude' , [ '$http' , '$compile' , '$templateCache' , function ( $http , $compile , $templateCache ) {
345- return {
346- link : function ( scope , elem , attrs ) {
347- if ( scope . content ) {
348- // TODO: How to solve the problem of pre-loading the template?
349- // TODO: Should this be watching for changes in scope.content?
350- var templateUrl = scope . content ,
351- transcludeScope = scope . $parent . $parent ;
352-
353- $http . get ( templateUrl , { cache : $templateCache } )
354- . then ( function ( response ) {
355- elem . html ( response . data ) ;
356- $compile ( elem . contents ( ) ) ( transcludeScope ) ;
357- } ) ;
358- }
359- }
360- } ;
361- } ] )
362-
363343. directive ( 'tooltipPopup' , function ( ) {
364344 return {
365345 restrict : 'EA' ,
366346 replace : true ,
347+ scope : { content : '@' , placement : '@' , animation : '&' , isOpen : '&' } ,
367348 templateUrl : 'template/tooltip/tooltip-popup.html'
368349 } ;
369350} )
@@ -376,11 +357,11 @@ angular.module( 'ui.bootstrap.tooltip', [ 'ui.bootstrap.position', 'ui.bootstrap
376357 return {
377358 restrict : 'EA' ,
378359 replace : true ,
360+ scope : { content : '@' , placement : '@' , animation : '&' , isOpen : '&' } ,
379361 templateUrl : 'template/tooltip/tooltip-html-unsafe-popup.html'
380362 } ;
381363} )
382364
383365. directive ( 'tooltipHtmlUnsafe' , [ '$tooltip' , function ( $tooltip ) {
384366 return $tooltip ( 'tooltipHtmlUnsafe' , 'tooltip' , 'mouseenter' ) ;
385367} ] ) ;
386-
0 commit comments