In my application, I want to fire an ajax call when ng-click event occur :

```
<ul class="sub">
    <li>
        <a href="javascript:;"  ng-class="{active : isSet(1)}" ng-click="getData(); setTab(1)">Bla bla bla</a>
    </li>
</ul>

```

my script :

```
angular.module('mainApp', ['smart-table'])
            .controller('TabController', ['$scope', function ($scope, $http)
            {
                $scope.tab = 2;

                $scope.setTab = function (newTab)
                {
                    $scope.tab = newTab;
                };

                $scope.isSet = function (tabNum)
                {
                    return $scope.tab === tabNum;
                };

                $scope.getData = function ()
                {
                    $http({
                        url: "/goodsList",
                        method: "GET"
                    }).success(function (data, status, headers, config)
                    {
                        angular.copy(data, $scope.oriList);
                    }).error(function(data, status, headers, config)
                    {
                        alert('Error getting data');
                    });
                };
            }]);

```

When i debug my script on IntelliJ, it it stop on login section, and the response is the userinfo (which is the response of spring sercurity service). There is no line of code that fire the ajax call except the li tag. 

1. Why my ajax fire right after spring security service?
2. In addition, after login to home page, i click the li tag but ajax call doesn't fire, because the debugger doesn't stop at the break point. What mistake did I make?

[![enter image description here](https://i.stack.imgur.com/hwXyk.png)](https://i.stack.imgur.com/hwXyk.png)