>
> Hi Luis, thanks for a nice and clear explanation! I understand services
>> and factories better now.
>>
>
>> If the function does not return an object "this" object is returned.
function Person() {
this.name = "John";
}
var person1 = Person();
var person2 = new Person();
Im a bit lost here. I can surely access John as *person2.name*, but if
"this" object returned then why doesn't it say *[object Object]* when I try
to display person1, but says undefined, so when you say *var* *person1 =
Person()* - what is actually returned?
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.