AngularJS Tooltip using UI Bootstrap tpls HTML Example

By Hardik Savani October 20, 2023 Category : Bootstrap Angular

We are mostly use tooltip when the user hovers his cursor over a specific element purpose. In this post we going to create tooltip when cursor hovers on button, in this example i use ui-bootstrap-tpls plugin for tooltip. If you don't more about this plugin then no worry it is from scratch.

In this example i added four button for different placement like top, right, left and bottom, so that way you can use any more that you want. So let's bellow example and also you can check demo.


<html lang="en-US">

<link rel="stylesheet" href="">

<script src=""></script>

<script src=""></script>


<div ng-app="myApp">

<h2 class="text-center">AngularJS Tooltip Example</h2>

<div class="container text-center">

<button class="btn btn-primary" tooltip-placement="left" uib-tooltip="Hi,">Tooltip Left</button>

<button class="btn btn-danger" tooltip-placement="bottom" uib-tooltip="Hi,">Tooltip Bottom</button>

<button class="btn btn-info" tooltip-placement="top" uib-tooltip="Hi,">Tooltip Top</button>

<button class="btn btn-warning" tooltip-placement="right" uib-tooltip="Hi,">Tooltip Right</button>




var app = angular.module('myApp', ['ui.bootstrap']);