Created
November 28, 2021 05:01
-
-
Save dev-sankhadip/46b0808b461d5ed7ece277b3673f212e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Component, OnInit } from '@angular/core'; | |
@Component({ | |
selector: 'app-firebase-crud', | |
templateUrl: './firebase-crud.component.html', | |
styleUrls: ['./firebase-crud.component.css'] | |
}) | |
export class FirebaseCrudComponent implements OnInit { | |
studentDetails = { | |
name: '', | |
age: '' | |
} | |
constructor() { } | |
studentCollectiondata = [ | |
{ | |
name: 'Sankhadip Samanta', | |
age: 21, | |
id: '1111' | |
}, | |
{ | |
name: 'Sankhadip Samanta', | |
age: 21, | |
id: '1111' | |
} | |
] | |
ngOnInit(): void { | |
} | |
add() { | |
const { name, age } = this.studentDetails; | |
} | |
get() { | |
} | |
delete(docId: string) { | |
console.log(docId); | |
} | |
update(docId: string, name: HTMLInputElement, age: HTMLInputElement) { | |
console.log(docId); | |
console.log(name.value); | |
console.log(age.value) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment