I have created array in controller and used that value in dropdown in angularjs view
controller :
$scope.menus = ['Home','WorkFlow','Statistics','Users','Projects','Setting'];
view:
<select name="selectedRole" ng-model="selectedRole" ng-options ="x.role for x in roles">
<option value="">Role</option>
</select>
In Server.js I wrote function to save
app.post('/addUser', function(req, res) {
userCollection.save(req.body, (err, result) => {
if (err) return console.log(err)
console.log('Roles Added');
res.redirect('/users')
console.log('result')
})
})
But I don't know how to save the selected Dropdown value in my mongodb. And am Using mongoclient
Kindly Any one help me to solve this Issue.