firebase/angularFire — pull request #18 by Newtrin0 (2013-04-22 14:32:56+00:00)
Title: Use Angular $parse service to assign values in $scope

Model value assignment in `_resolve` works correctly only with models at the top level of `$scope`. When the synchronized model is referenced as `"name['key']"` or `"a.b.c[10]"`, then `$watch` tracks the changes in the correct models: `$scope.name['key']` or `$scope.a.b.c[10]`, but updates from Firebase would be assigned to wrong ones: `$scope["name['key']"]` or `$scope["a.b.c[10]"]`.

The modified code uses Angular `$parse` service to assign the correct model within the `$scope` even if it belongs to an object or array.

The update replaces the following line in `_resolve`:
```
$scope[name] = angular.copy(val);
```
with
```
this._parse(name).assign($scope, angular.copy(val));
```
Reference to $parse service is passed to AngularFire as a parameter.