refactor code

This commit is contained in:
MaysWind 2016-06-29 22:08:52 +08:00
parent 7e5d851ef4
commit 3090b587fd

View file

@ -16,7 +16,7 @@
angular.extend(options, attrs);
$(element).tooltip({
angular.element(element).tooltip({
title: scope.title,
placement: options.ngTooltipPlacement,
container: options.ngTooltipContainer,
@ -24,7 +24,7 @@
});
scope.$watch('title', function () {
$(element).attr('title', scope.title).tooltip('fixTitle');
angular.element(element).attr('title', scope.title).tooltip('fixTitle');
});
}
};