Ng-DoubleClick-5

 

In this if we double click on P(paragraph) element text then text in h4 element will display because default value of isShow variable is true which is assign to ng-show directive.

 
 
 
<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Welcome to LearnKode - A code learning platform</title> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.2/angular.min.js"></script> </head> <body ng-app> <div> <p ng-dblclick="isShow=true">Double-click on this paragraph.</p> <h4 ng-show="isShow">Hello <span style="color:red">Learn</span>It</h4> </div> </body> </html>
Output