title: angularJs ng-click for a method inside controller
body: <p>i want to call the function Supportticket() which is inside myController on ng-click but its not working please help me regarding this matter .
  the Supportticket() method is inside the controller in my javascript file 
  and i want to call it on ng-click on the tab1.</p>
  
  <pre><code>app.controller('myController', function ($scope, $http) {
      GetSupportData();
     // GetQCQAData();
          $scope.setSelected = function () {
          // console.log("show", arguments, this);
          if ($scope.lastSelected) {
              $scope.lastSelected.selected = '';
          }
          this.selected = 'rowSelect';
          $scope.lastSelected = this;
      }
      $scope.predicate = '-Date';
      function GetSupportData() {
          blockUI();
          $http({
              method: 'Get',
              url: '/Home/GetSupportData',
          }).success(function (data, status, headers, config) {
              $scope.Support = data.SupportData;
  
              var fetchedsupportCountLen = data.supportCount.length;
              if (fetchedsupportCountLen &gt; 0) {
                  $('#tblSupportticket tr:gt(0)').remove();
                  $('#OpenKey').removeClass('KeyOpenIssue');
                  $('#OpenKey').addClass('KeyOpen');
                  $('#lblOpenCount').html("");
                  $('#lblClosedCount').html("");
                  $('#lblInProgressCount').html("");
                  $('#lblOnHoldCount').html("");
                  $('#lblInProgress3DaysCount').html("");
  
  
                      var sv = getCookie('SelectTab');
                      if (sv == 'Support') {
                          $('#tblLegendQcqa').hide();
                          $('#tblLegend').show();
                      }
                      else if (sv == 'QCQA') {
                          $('#tblLegendQcqa').show();
                          $('#tblLegend').hide();
                      }
  
  
                  for (var i = 0; i &lt; fetchedsupportCountLen; i++) {
                      if (i == 0)
                          $('#lblOpenCount').html(' Open (' + data.supportCount[i] + ')');
                      else if (i == 1)
                          $('#lblClosedCount').html(' Closed Today (' + data.supportCount[i] + ')');
                      else if (i == 2)
                          $('#lblInProgressCount').html(' In Progress (' + data.supportCount[i] + ')');
                      else if (i == 3)
                          $('#lblOnHoldCount').html(' On Hold (' + data.supportCount[i] + ')');
                      else if (i == 4)
                          $('#lblInProgress3DaysCount').html(' Inactive for more than 3 working days (' + data.supportCount[i] + ')');
  
  
  
                  }
              }
              enablePinning: true;
              unblockUI();
          }).error(function (data, status, headers, config) {
              unblockUI();
              $scope.message = 'Unexpected Error';
          });
      }
  
      function Supportticket() {
          //$('#tblLegendQcqa').hide();
          createCookie("SelectTab", "Support");
          $('#tblSupportticket tr:gt(0)').remove();
          var sv = getCookie('SelectTab');
          if (sv == 'Support') {
              $('#tblLegendQcqa').hide();
              $('#tblLegend').show();
  
  
          }
          else if (sv == 'QCQA') {
              $('#tblLegendQcqa').show();
              $('#tblLegend').hide();
          }
      }
  
  
  
  
  });
  </code></pre>
  
  <p>here is my html </p>
  
  <pre><code>    &lt;div ng-app="myModule"&gt;
  &lt;div data-ng-controller="myController"&gt;
  &lt;ul class='tabs'&gt;
      &lt;li&gt;&lt;a href='#tab1'  data-ng-click="Supportticket()" class="tabLI"  id="Tab1_Reload"&gt;Support&lt;/a&gt;&lt;/li&gt;
      &lt;li style=""&gt;&lt;a href='#tab2'  class="tabLI"&gt;QC/QA&lt;/a&gt;&lt;/li&gt;
  &lt;/ul&gt;
      &lt;/div&gt;
      &lt;/div&gt;
  </code></pre>