ItSolutionStuff.com

AngularJS Tooltip using UI Bootstrap tpls HTML Example

By Hardik Savani • October 20, 2023
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.

Example:

<html lang="en-US">


<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">

<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.9/angular.min.js"></script>

<script src="https://cdnjs.cloudflare.com/ajax/libs/angular-ui-bootstrap/1.3.3/ui-bootstrap-tpls.min.js"></script>


<body>


<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, Itsolutionstuff.com">Tooltip Left</button>

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

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

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

</div>


</div>


<script>

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

</script>


</body>

</html>

Hardik Savani

Hardik Savani

I'm a full-stack developer, entrepreneur, and founder of ItSolutionStuff.com. Passionate about PHP, Laravel, JavaScript, and helping developers grow.

📺 Subscribe on YouTube

We Are Recommending You

AngularJS Remove Duplicates Object from Array Example

Read Now →

AngularJS Check Checkbox is Checked or Not Example

Read Now →

PHP AngularJS Add Remove Input Fields Dynamically Example

Read Now →

AngularJS Image Upload with Preview Example

Read Now →

How to Hide Div After Some Time in AngularJS?

Read Now →

How to Call Function on Page Load in AngularJS?

Read Now →

JQuery Tooltip Example using JQuery UI Plugin

Read Now →

AngularJS Sorting(using Orderby Filter) Table Data Example

Read Now →

How to Change Date Format using Date Filter in AngularJS?

Read Now →

How to Add Tooltip in Bootstrap?

Read Now →

AngularJS - How to Limit String Length using Filter?

Read Now →

AngularJS - How to Capitalize the First Letter of Word Example

Read Now →

How to Remove HTML Tags from String in AngularJS?

Read Now →