Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import { Component, OnInit } from '@angular/core';
- import { FamilyService } from '../family.service';
- import { Father } from '../father';
- import { Child } from '../child';
- import { FATHERS } from '../mock-father';
- @Component({
- selector: 'app-fathers-list',
- templateUrl: './fathers-list.component.html',
- styleUrls: ['./fathers-list.component.css']
- })
- export class FathersListComponent implements OnInit {
- fathers = FATHERS;
- //fathers: Father[] = [];
- selectedFather: Father;
- firstName: string = "";
- secondName: string = "";
- pesel: string = "";
- birthDate: string = "";
- gender: string = "";
- constructor(private familyService: FamilyService) {
- }
- newChild(): void{
- this.child = new Child();
- }
- ngOnInit() {
- }
- onSelect(father: Father): void {
- this.selectedFather = father;
- }
- searchChild(): void {
- this.familyService.findChild(this.firstName, this.secondName, this.pesel, this.birthDate, this.gender).subscribe(data => ddd(data:Data));
- }
- ddd(data: Data){
- console.log(data);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement