Ng-Blur-7

 

Ng-Blur-7

 
 
 
<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title></title> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.2/angular.min.js"></script> <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css"> </head> <body ng-app="app"> <div class="container"> <div ng-controller="LearnIt"> <h3>Ng-Blur</h3> <h3 ng-show="msg">Enter your text here</h3> <input class="form-control" type="text" ng-focus="msg=true" ng-blur="msg=false" /> </div> </div> <script> var app = angular.module("app", []); app.controller('LearnIt', ['$scope', '$timeout', function ($scope, $timeout) { $scope.msg = false; }]); </script> </body> </html>
Output