Bind dropdown values from mongodb in angular
I am working on a project where i am using mongodb as a backend and angular2 for front end. I have two collections in db as Country{id, countryname} and state{id, userId, statename} I want to find all the states depending on the country , I tried to write a code using $lookup but getting nothing. Also i need to use these two collections in an angular application for cascading dropdown. If i Select "India" only "States" in india should populate.I am new to mongodb. Plz help
3 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Sanwar RanwaRank #23 · 44.7K reputationPosted Jan 25, 2019, 2:15 AM EST
Puneet KankarRank #446 · 5.6K reputationPosted Jan 26, 2019, 5:00 AM EST
deepak upadhya33 reputationPosted Jan 31, 2019, 7:49 PM EST