I am having an issue using $scope within this function. Where should I define the argument $scope so that it works properly?
Thank you
Below is the basic structure of my code with key lines included:
myApp.controller('myCtrl', ['$scope','Fact', function($scope, Fact) {
$scope.myFunc = function() {
Fact.init(beamNumber,function(){
polygonsBeam[list.length - 1 - i].addListener('click',function(e) {
console.log($scope.db)
$scope.db = 20
console.log(list[list.length - 1 - polygonsBeam.indexOf(this)]);
});
});
};
}]);