I'm new to AngularJS and I'm learning Factory/Services. I coded this simple application to pass Fire Factory in Controller, but when I inject the Factory/Service in a controller it throws an error
home.html
<div class="home" ng-controller="HomeCtrl">
Home <button ng-class="logut()">LogOut</button>
{{test}}
</div>
app.js
cheers.factory('Fire',function($scope,$location,$firebaseObject){
return {name : 'Pawan Choudhary'};
});
cheers.controller('HomeCtrl', ['$scope','$location','Fire',function ($scope, $location,Fire) {
$scope.test = "working!";
}]);
It throws the following error:

var factory = {}then creating functions and variables in factory , then return factory