ada2
ada2
<html ng-app="studentApp">
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.8.2/angular.min.js"></script>
</head>
<body ng-controller="StudentController">
<table>
<thead>
<tr>
<th>ID</th>
<th>Name</th>
<th>Age</th>
</tr>,
</thead>
<tbody>
</tr>
</tbody>
</table>
<script>
$scope.students = [
{ id: 1, name: "Alice", age: 20 },
];
});
</script>
</body>
</html>
Write Node JS code to print values of query string variables Email and Mobile
from the following URL. CO-2 CO-3
http://localhost:8080/[email protected]&Mobile-8877665544
const express = require('express');
console.log(`Email: ${email}`);
console.log(`Mobile: ${mobile}`);
});
app.listen(PORT, () => {
});
Consider a GTU database and Student Collection with fields: name, age,
course, and grades. Write code to perform insertOne() and InsertMany()
operation on Student collection using Node.js and MongoDB.
var mydata2 = [
{ name: "pramit", age: 18, course: "BE", grades: "AA" },
{ name: "pramit", age: 18, course: "BE", grades: "AA" }
];
// Insert multiple documents after insertOne() completes
await dbo.collection("students").insertMany(mydata2);
console.log("Many documents inserted!!!")
});
});
});
main()
.then(console.log)
.catch(console.error)
.finally((=>client.close());
db.close();
});
Consider a GTU database and Employee Collection with fields: empid, name, Designation
and salary. Write code to perform updateOne() and updateMany() operations on
Employee Collection using Node.js and MongoDB.
var MongoClient = require('mongodb').MongoClient;
var url = "mongodb://localhost:27017/";
calculator
<html>
<head>
<script
src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.9/angular.min.js"></script>
<title>Document</title>
</head>
<body>
<h1> calculator</h1>
<div ng-app="">
<p>Enter first number: <input type="number" ng-model="number1"></p>
<p>Enter second number: <input type="number" ng-model="number2"></p>
<p>Sum is: {{ number1 + number2 }}</p>
<p> minus is: {{ number1 - number2 }}</p>
<p>multiple is: {{ number1 * number2 }}</p>
<p>division is: {{ number1 / number2 }}</p>
</div>
</body>
</html>
Name dispaly
<html>
<head>
<script
src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.9/angular.min.js"></script>
<title>Document</title>
</head>
<body>
<h1> calculator</h1>
<div ng-app="">
<p>Enter first name: <input type="text" ng-model="number1"></p>
<p>Enter last name: <input type="text" ng-model="number2"></p>
<p ng-bind="number1"></p>
<p ng-bind="number2"></p>
</div>
</body>
</html>