```
<button id="voterListSearchButton" class="serachButton" ng-click="onSearchButton1Click()">search</button>

```

This is my search button:

```
$scope.onSearchButton1Click = function() {
    var partId = $("#partIdSearch").val();
    var firstName = $("#firstNameSearch").val();
    var lastName = $("#lastNameSearch").val();
    var fathersName = $("#fathersNameSearch").val();
    var address = $("#address").val();
    $rootScope.$broadcast('onSearchButton1Click',partId,firstName,fathersName,lastName,address);
}

```

This is my controller for the above button. I broadcast this event to another controller in the following way:

```
$scope.$on('onSearchButton1Click',function(event,data1,data2,data3,data4,data5){
    pId= data1;
    fname=data2;
    lname=data3;
    fathersName=data4;
    address= data5;

    VoterDataService.search(data1,data2,data3,data4,data5,0).success(function(response){
        $scope.arr = response.search;    
    });
});

```

This is my service code:

```
voterDataServiceAPI.search = function(data1,data2,data3,data4,data5,pageNo,lang) {
    var url ="api/search" + "?part_id="+data1 +"&first_name="+data2+"&middle_name="+data3+"&last_name="+data4+"&subpart=" + data5 +"&page_no="+pageNo;
    return $http({
        method : "GET",
        url:url,
        headers:{
            "content-type": "application/json"
        }
    });
}

```

Why single click fires 2 times?