While taking Angular's complimentary online course, I came across the following code snippet:
app.controller('GalleryController', function(){
this.current = 0;
this.setCurrent = function(imageNumber){
this.current = imageNumber || 0;
};
});
It is worth noting that typically the $scope
is passed as an argument to the controller. Is it actually necessary in this case?