Closed rala72 closed 7 years ago
This was a design decision, based on the fact that a common JavaScript convention for declaring private variables is to prefix them with _
.
For context on why it's different than the default SDK behavior, keep in mind that AngularFire is creating class instances that can be extended, and provide client-side functionality (not just raw JSON objects for data transfer). So our goal here is to make it as simple and straightforward as possible to extend and use $firebaseArray and $firebaseObject, and to make saving and server sync as transparent as possible.
To do so, you need a simple convention to separate "local" or private things from ones you want sent to the server. Since $
is technically reserved by the Angular libs, _
continues to be the appropriate way to prefix your private variables and methods pre-ES6.
We could revisit if there were significant numbers of people having issues here, but given that it's been implemented this way nearly 3 years and this is the first comment on it, I suspect it's fine as is.
Version info
Angular: 1.5.6 Firebase: 3.6.2 AngularFire: 2.2.0
Issue
StackOverflow question