How to pass Event emitter’s value from child component to parents component’s function as an argument?

I am getting ‘date’ returned from child event emitter, I am trying to pass the returned ‘date’ as an argument to a function to my parent’s component, and that function needs to be initialized when the page loads so that I can crate the template view. I attempted the following but I couldn’t find a way to pass the value as an argument of my "getData()" function on page load. Any help will be appreciated, thanks!


<child (todaysDate)="getTodaysDate($event)"></child>


import { Component } from '@angular/core';

  selector: 'my-app',
  templateUrl: './parentComponent.component.html',
  styleUrls: [ './parentComponent.component.css' ]
export class parentComponent implements OnInit  {


  ngOnInit(): void {


///subscribe data from api

Source: Angular Questions