Posts

Assignment -1 KEY

 Assignments 1,2, and 3   https://drive.google.com/file/d/1YdLCEISk5ax3uTELfbbju0j4VRRdUPhJ/view?usp=drive_link  Assignments 4,5, and 6 https://drive.google.com/file/d/1T6syb_DPnx5vXAfJlp9aD6dikJGYx7eR/view?usp=drive_link  

Assignments - 1

Assignment 1: Display a Welcome Message AIM: Create a simple Angular app that displays your name and a welcome message. Assignment 2: Two-Way Data Binding with an Input Box AIM: Create an input box where the user can type their name, and it updates live on the screen. Assignment 3: Simple Task List (Mini Todo App) AIM: Add tasks to a list and display them. Assignment 4: Profile Card App AIM : Show a profile card using a separate ProfileCardComponent . Assignment 5: Counter App AIM : Have a counter with increment/decrement buttons using a separate CounterComponent . Assignment 6: Task List App AIM: A simple todo list with add/remove functionality using a TaskListComponent .

MongoDB Exercise :2

 studentsB> db.aids.find().count() 4 studentsB> db.aids.find().count() 4 studentsB> db.aids.find().limit(3) [   {     _id: ObjectId("66fa2428ca0fc631a23b264f"),     SRN: 201,     SName: 'A',     yr: 3   },   {     _id: ObjectId("66fa2479ca0fc631a23b2650"),     SRN: 202,     SName: 'B',     yr: 3   },   {     _id: ObjectId("66fa249eca0fc631a23b2652"),     SRN: 303,     SName: 'CC',     yr: 3   } ] studentsB> db.aids.find().limit(2) [   {     _id: ObjectId("66fa2428ca0fc631a23b264f"),     SRN: 201,     SName: 'A',     yr: 3   },   {     _id: ObjectId("66fa2479ca0fc631a23b2650"),     SRN: 202,     SName: 'B',     yr: 3   } ] studentsB> db.aids.find().sort() [   {     _id: ObjectId("66fa2428ca0fc631a23b264f"), ...

Create and drop database and collection

  In MongoDB, you can drop a database using the db.dropDatabase() method, and you can drop a collection using the db.collection.drop() method. Here's how you can use these commands: Drop a Collection : To drop a specific collection in MongoDB, you can use the db.collection.drop() method. Replace collection with the name of the collection you want to drop. Here's an example: use your_database_name // Switch to the appropriate database db.your_collection_name.drop() Replace your_database_name with the name of your database and your_collection_name with the name of the collection you want to drop. Drop a Database : To drop an entire database in MongoDB, you can use the db.dropDatabase() method. Be very careful when using this command because it will permanently delete the entire database and all its collections. use your_database_name // Switch to the appropriate database db.dropDatabase()

MongoDB Insert, find, update and delete

 abc123> db.eswar.insertOne({SRN:001,SName:'a',yr:3}) {   acknowledged: true,   insertedId: ObjectId("66f392b1d8b1cbf0117c527c") } abc123> db.eswar.insertOne({SRN:002,SName:'b',yr:3}) {   acknowledged: true,   insertedId: ObjectId("66f392cbd8b1cbf0117c527d") } abc123> db.eswar.insertOne({SRN:003,SName:'c',yr:2}) {   acknowledged: true,   insertedId: ObjectId("66f392e3d8b1cbf0117c527e") } abc123> db.eswar.find() [   {     _id: ObjectId("66f392b1d8b1cbf0117c527c"),     SRN: 1,     SName: 'a',     yr: 3   },   {     _id: ObjectId("66f392cbd8b1cbf0117c527d"),     SRN: 2,     SName: 'b',     yr: 3   },   {     _id: ObjectId("66f392e3d8b1cbf0117c527e"),     SRN: 3,     SName: 'c',     yr: 2   } ] abc123> show collections eswar abc123> db.eswar.update({SName:'C'},{$set:{yr:3}}) DeprecationWarni...

Mean stack status

 https://docs.google.com/forms/d/e/1FAIpQLSdBj6rR-vVcndcBeALeNEZuG3clwekFdMr71imXZbdQhYz9qA/viewform?usp=sharing

Different paranthesis ( ), [ ], [ ( ) ], { } used in Angular and their meanings

 In Angular, different types of brackets are used for various purposes in templates to handle data binding and structural directives. Here’s a breakdown of how each type of bracket is used: 1. Parentheses () Purpose : Used for event binding. Usage : When you want to handle events such as clicks, changes, or any other DOM events, you use parentheses. <button (click)="handleClick()">Click me</button> Here, (click) is the event binding that calls the handleClick() method in the component when the button is clicked. 2. Square Brackets [] Purpose : Used for property binding. Usage : When you want to bind a property of an HTML element to a component property, you use square brackets. Example: <img [src]="imageUrl" /> In this case, [src] binds the src attribute of the <img> element to the imageUrl property in the component. 3.  Both Square and Parentheses [( )] Purpose : Used for two-way data binding. Usage : This combines property binding and...