Monday, 7 January 2019

AngularJS ng-blur directive

AngularJS ng-blur directive

ng-blur directive specifies a behaviour on blur events and use to execute the AngularJS expression or call the function that you need to manipulate the Dom or data.

<element ng-blur="expression">
 ...your code...


<div ng-app="myApp1" ng-controller="Employee1Controller">
<p>Url: <input ng-blur="GetInfo()" type="text" />
span style="color:Red"> {{ Url}}</span>
        var myapp = angular.module('myApp1', []);
        myapp.controller('Employee1Controller', function ($scope) {
            $scope.GetInfo = function () {
                $scope.Url = "valid url accpeted as";

1 comment:

Note: only a member of this blog may post a comment.