I have a scope model called person that has a firstname, lastname and fullname. My goQuery works with this:
$scope.person = $goQuery('person', { userName: $scope.person.findme }, { sort: { 'userName': 'asc' }, limit: 1 }).$sync();
The only problem I'm having is that it only populates the value for the field I'm searching and not the whole model. What am I missing?
$scope.person.findme throws an error because $scope.person is not yet defined. I'm not sure how this is working at all.
Here's a working example:
If you look at the model on window.person you should see user1's ID and their data under it.