title: call a function on ng-click
body: <pre><code>&lt;html&gt;
  &lt;head&gt;
  &lt;title&gt;Javascript Login Form Validation&lt;/title&gt;
  &lt;link rel="stylesheet" href="css/style.css"/&gt; 
  &lt;script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.25/angular.min.js"&gt;&lt;/script&gt;
   &lt;script src="//ajax.googleapis.com/ajax/libs/angularjs/1.2.25/angular-route.js"&gt;&lt;/script&gt;
    &lt;script&gt;
  function MyCtrl($scope){
      $scope.myval = 5;
  
      $scope.ctrlClickHandler = function(){
          alert("Inside controller: value of myval is " + $scope.myval);
      }       
  };
  
  var globalClickHandler=function globalClickHandler(){
      alert("Inside global click handler ");
  }
  &lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;div class="container"&gt;
  &lt;div class="main" ng-app ng-controller="MyCtrl"&gt;
  &lt;form id="form_id" method="get" name="myform"&gt;
  &lt;label&gt;User Name :&lt;/label&gt;
  &lt;input type="text" name="username" id="username"/&gt;
  &lt;label&gt;Password :&lt;/label&gt;
  &lt;input type="password" name="password" id="password"/&gt;
  &lt;button type="button" ng-click="ctrlClickHandler()"&gt;Login&lt;/button&gt;
  &lt;/form&gt;&lt;/div&gt;&lt;/div&gt;&lt;/body&gt;&lt;/html&gt;
  </code></pre>
  
  <p>this is my above code and i am unable to call the ctrlClickHandler method . i dont knwo where i am wrong. could any one please help to me on it.
  Thanks in advance!.</p>