I've read extensively about Javascript prototypal inheritance, specifically in child scopes. My understanding is that we always ensure a "." is in our ng-model binding so that it references an object.
My question is ... why does prototypal inheritance create a primitive on its local scope but not an object? It seems like the very same thing.
In one case, we have a primitive. In another case we have an object - say an array. What's even more confusing is that I can pass an object to the child scope (without a ".") and by pushing data onto the object that was passed down within the local scope, the parent object is still modified and thus no child array object is created. Again, why? Prototypal inheritance seems to auto-create primitives ... what makes an object different?
doesn't matteras it sure does matter once scopes get turned into child scopes as to what stays bound and what doesn'tng-model="something.text"thentextwill be added toscope.something. But if the objectsomethingdoesn't already exist somewhere in the scope chain, then it will be created and added to the current scope. If you meant something different, Charles, please, rephrase the question.