Last active
May 31, 2022 09:17
-
-
Save karthikchintala1/dea7fc6586a10b128ec39640145a1317 to your computer and use it in GitHub Desktop.
using @output with EventEmitter in angular
This file contains 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 Output, EventEmitter from angular core | |
import {Component, Input, Output, EventEmitter} from '@angular/core' | |
//define the event emitter | |
@Output() | |
change: EventEmitter<number> = new EventEmitter<number>(); | |
//emit the event with the above change event | |
this.change.emit(11); //11 will be emitted to the parent |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@output()
change: EventEmitter = new EventEmitter();