0

My project new integration :

I am using find() method but it is not working.

var arrayResults = collection.find({'userId':$rootScope.userId,'productType':'kcc'});

Like this working fine.

var arrayResults = collection.find({'productType':'kcc'});

am looking like this please help me any one. var arrayResults = collection.find({'userId':$rootScope.userId,'productType':'kcc'});

1 Answers1

0

Given only this information without a code sample, I would say this won't work because $rootScope isn't defined in that controller or etc. Try to logout the $rootScope.userId and if it's there, check if it's the same data type that is stored in the DB.

Petar
  • 1