AngularJs title binding

AngularJs title binding using ng-attr-title

Hello everyone, I am going to share the code sample for display the title on link mouse over using the angular title attribute(ng-attr-title).

The all the detail of title binding as given below, if you want to see the live running demo for the same then you click on below given link.

Controller code-sample as given below

    var app = angular.module('titleApp', []);
    app.controller('titleCtrl', function ($scope) {
        $scope.domain = '';

HTML code-sample as given below

<div ng-app="titleApp" ng-controller="titleCtrl">
   <a ng-attr-title="{{domain}}" href="#"></a>

The Live demo code-sample (AngularJs + HTML)

<!DOCTYPE html>
    <meta charset="utf-8" />
    <title>angularjs title binding </title>
    <script src=""></script>
        var app = angular.module('titleApp', []);
        app.controller('titleCtrl', function ($scope) {
            $scope.domain = '';
<body ng-app="titleApp" ng-controller="titleCtrl">
    <p>AngularJs title binding</p>
    <a ng-attr-title="{{domain}}" href=""></a>

The output : go to link


Hey! I'm Anil Singh. I author this blog. I'm Active Blogger, Programmer. I love learning new technologies, programming, blogging and participating the forum discussions more...
My Blogs - and
My Books - Interview Questions and Answers Books- Get Your Book in 15+ Digital Stores Worldwide..

You Might Also Like Powered by Blogger.
ASK Questions