Please clarify the wording
agnislav opened this issue · comments
Hi guys,
I'm updating a russian translation and bumped into a question with the following sentence.
Services representing the domain preferably a
service
instead of afactory
.
Could you please describe the meaning of the "Services representing the domain" phrase? I understand an example but to keep a consistency I need to understand this in details.
Thanks a lot!
Thanks for the issue, this practice really sounds a little weird! I think this is out of date. Usually when I build my domain "classes" in active record like way I use factory, like:
module.factory('Developer', function ($http) {
function Developer(id, langs) {
this.id = id;
this.langs = langs;
}
Developer.get = function (id) {
$http.get('/developers/' + id)
.then(function () {
// whatever
});
};
Developer.prototype.save = function () {
$http.post('/developer')
.then(function () {
// whatever
});
};
return Developer;
});
or something similar...
Anyway, lets keep the issue open and not make any changes until we have opinion by third party 😄
Thanks for the prompt response.
Got the answer, will skip it for now.