I am browsing this blog .

The author pushes forward
When you use Factory , you create an object, add properties to it, and then return the same object . When you pass this service to your controller, those properties of the object will now be available in that controller through your factory.
So, in my understanding, this line

replaced by

as a service , an object is returned when myFactory () is called.
No problem up to this point
Now consider a fragment
<script type="text/javascript">
var module = angular.module('MyApp', []);
module.factory('VaderService', function() {
var VaderClass = function(padawan) {
this.name = padawan;
this.speak = function () {
return 'Join the dark side ' + this.name;
}
}
return VaderClass;
});
module.controller('StarWarsController', function($scope, VaderService) {
var luke = new VaderService('luke');
$scope.luke = luke.speak();
});
</script>
</head>
<body ng-app="MyApp">
<table ng-controller="StarWarsController">
<tbody>
<tr><td>{{luke}}</td></tr>
</tbody>
</table>
</body>
prints like
Join the dark side luke
I do not understand what is happening here with this line
var luke = new VaderService('luke');
factory VaderService ('luke'), luke , , ,
module.factory('VaderService', function() {...
-, i.e VaderClass(), . ( , javascript ).
luke VaderClass?