I have a function called getMail()

```
$scope.getMail=function(){
  $http.get(APISource).
    success(function(data) {

  $scope.mail =data;

}).
error(function(data) {
    console.log("error");
  console.log(data);

});

}

```

in the success of this function i am saving the return data in $scope.mail;
and also i have another function 

> 
> function1() in the same controller but $scope.mail is not accessible.
> 
> 
> 

please help.