Using Bootstrap Tooltip with AngularJS

后端 未结 19 1551
抹茶落季
抹茶落季 2020-12-07 10:40

I am trying to use the Bootstrap tooltip in an app of mine. My app is using AngularJS Currently, I have the following:

19条回答
  •  暖寄归人
    2020-12-07 10:57

    You can create a simple directive like this:

    angular.module('myApp',[])
        .directive('myTooltip', function(){
            return {
                restrict: 'A',
                link: function(scope, element){
                    element.tooltip();
                }
            }
        });
    

    Then, add your custom directive where is necessary:

    
    

提交回复
热议问题