Posts

r

  <! DOCTYPE html >   < html ng-app = "studentApp" >   < head >   < script   src = ' https://ajax.googleapis. com/ajax/libs/angularjs/1.3. 16/angular.min.js ' ></ script >   </ head >   < body ng-controller = " studentController" >   < h1 > Student Information: </ h1 >   < form ng-submit = "submitStudnetForm() " >   < label for = "firstName" > First Name: </ label >< br />   < input type = "text" id = "firstName" ng-model = "student.firstName" />< br />     < label for = "lastName" > Last Name </ label >< br />   < input type = "text" id = "lastName" ng-model = "student.lastName" />< br />   < label for = "dob" > DoB </ label >< br />   < input type = "date" id = "dob...

p2

  const mongoose = require ( "mongoose" ); mongoose . connect ( "mongodb://127.0.0.1:27017" , {     dbName : "test" ,     useUnifiedTopology : true ,     useNewUrlParser : true }). then (() => {     console . log ( "Connected to database" ); }). catch (( err ) => {     console . log ( err ); }); const studentSchema = new mongoose . Schema ({     name : String ,     rollNo : Number ,     class : String ,     age : Number ,     email : String }); // Defining Student model const Student = mongoose . model ( 'Student' , studentSchema ); // This step is optional. If the collection doesn't exist, Mongoose will create it automatically when you start saving documents. // Commenting it out won't affect the functionality. /* Student.createCollection().then(function () {     console.log('Collection is created!'); }); */ // Export the model module . exports =...