ArtemKrass,
angular.module('myApp', [])
.controller('MyController', ['myFactory', 'myService', function (myFactory, myService) {
myFactory.start();
myService.start();
}])
.factory('myFactory', function () {
var obj = {};
obj.start = function () {
console.info('hello Factory');
}
return obj;
})
.service('myService', function () {
this.start = function () {
console.info('hello Service');
}
});