python ruby-programming-language Smalltalk Vue.js Knockoutjs TypeScript JavaScript, OOPs JavaScript Angular 8,7,6,5,4 and 2 Interview Questions and Answers Angular 8,7,6,5,4 and 2 Interview Questions and Answers Angular 4 Angular 2 AngularJs 1.x NodeJs Perl Programming R Programming RequireJs Rust Programming Backbonejs closure programming language go-programming-language kotlin-programming-language
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 = 'http://www.code-sample.com';
    });

HTML code-sample as given below

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

The Live demo code-sample (AngularJs + HTML)

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


The output : go to link http://embed.plnkr.co/Bk12qs/preview



ANIL SINGH

Hi there! Welcome to my blog. My name is Anil Singh. I'm a author of this blog. For more detail about me, kindly refer to this link..
My Blogs - http://code-sample.com and http://code-sample.xyz
My Books - Interview Questions and Answers Books- Get Your Book in 15+ Digital Stores Worldwide..

You Might Also Like
www.code-sample.com/. Powered by Blogger.
ASK Questions