It is fine to access $scope
in that function.
.controller("myCtryl", function($scope, $http) {
$scope.functionA = function(){
$scope.data = "some data";
}
$scope.functionB = function(){
$scope.data //this id valid
}
}
solved Accessing $scope variable from another method in the same controller Angularjs