Recently starting to work with Angular, I have been tasked with debugging my colleague's code. While going through the factory functions, I came across a scenario where I need to add a reset_All method that calls the reset function of all modules. How can I accomplish this?
.factory('MyCollection', function() {
return {
resetAll: function(projectId) {
// call the reset function of SomeController
}
}
})
.controller('SomeController', function($scope, a) {
$scope.reset = function() {
...........
}
}