Need help configuring angular bootstrap tooltip (uibTooltip) to be disabled on mobile devices with angular-bowser
for device detection.
One possible solution is:
isMobile = _bowser.mobile
$uibTooltipProvider.options = { trigger: isMobile ? "none" : "mouseenter" }
Issue: $uibTooltipProvider
is a provider and bowser
is a service.
Using $uibTooltipProvider
is restricted to a config
function, but the bowser
service cannot be used in a config
function. Additionally, $uibTooltipProvider
cannot be used in a run
function where bowser
can be used.
Attempted to override the $get function as suggested here but the "ontouchstart" event in $window does not apply to tablets where tooltips should remain enabled.
Any suggestions for a workaround?