I am developing an AngularJs app . when I search about some controller samples like firebase Auth
.factory("Auth", function($firebaseAuth) {
var usersRef = new Firebase("https//<YOUR-FIREBASE-APP>.firebaseio.com/users");
return $firebaseAuth(usersRef);
})
this will use factory instead of controller. I have changed it to controller and it works as well. I need to know about the difference.