
Scenario
Our login form has a EventEmitter<Credentials> that emits a Credentials instance when the user presses submit.
We want to listen to this emitter inside out app.component .
Approach
Note that $event must be passed as an argument in order to receive the form value:
(credentials)=”logCredentials($event)”