I am trying to use scope inside this function but it seems to not working. Where should I put the argument $scope.
Thank you
Here is the structure of the code I put the main lines that reflect the structure :
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)]);
});
});
};
}]);