1

I have this Schema: (I am working with MEAN stack)

var userSchema = mongoose.Schema({
    firstName: String,
    lastName: String,
    randomText: String
});

var User = mongoose.model('User', userSchema);

A jade file:

.someClass Some default text
input.form-control.yfname(type="text", ng-model="user.firstName")
input.form-control.ylname(type="text", ng-model="user.lastName")
button Register

I want when I click Register button , whatever firstName and lastName is entered , to be saved to the database and the text from .someClass to be stored in the randomText field. Also I want to be able to find it later with db.collection.find but I am not sure how. Help is greatly appreciated :)

PrairieProf
  • 174
  • 11
DareDev1l
  • 121
  • 1
  • 8
  • 1
    You haven't included any details of the Express routes you've defined, nor have you included any client-side JavaScript. If you're asking for details on how to implement the routes on the server side, then just search Google for a tutorial on using Express. – Matthew Daly Jul 02 '14 at 12:46

0 Answers0