how can I call/access $scope.mydata from another method in the same controller in Angularjs?
My scenario is
.controller("myCtryl", function($scope, $http) {
$scope.functionA = function(){
$scope.data = "some data";
}
$scope.functionB = function(){
//access $scope.data here//
}
}
functionA?$scope.datain the other function before the previous function sets the value on it asyncronously. Currently your question is too unclear for us to provide a definitive answer for your issue,