Use in directives and components to emit custom events synchronously or asynchronously, and register handlers for those events by subscribing to an instance.
Questions tagged [angular-event-emitter]
171 questions
1
vote
0 answers
add @Output EventEmitter dynamically to Angular component
I'm adding childcomponents dynamically as shown here: https://plnkr.co/edit/iTG7Ysjuv7oiDozuXwj6?p=preview&preview
I changed the code slightly to this:
@ViewChild('parent', { read: ViewContainerRef })
target: ViewContainerRef;
private…

Anbesa
- 101
- 1
- 7
1
vote
4 answers
How to pass data from child component to parent component when button clicked on parent component
I need to pass input's value from child component to parent component when user click on a submit button that exists in parent component.
childComp template

Ali
- 1,633
- 7
- 35
- 58
1
vote
2 answers
core.js:5980 ERROR TypeError: Cannot read property 'Name' of undefined (angular)
I can't generate card with information in angular
my model:
export class order {
Name!: string
Surname!: string
Email!: string
Type!: string
Description!: string
constructor(name: string, surname: string, email: string,…

Nika Jobava
- 113
- 3
- 10
1
vote
2 answers
Angular 10 - Event Emmiter is not working - Sharing information between child and parent component
I've this parent-child components in Angular and I'm trying to pass an object from the child component to the parent in order to update a value from the parent's object array. I've been followint the angular documentation example but seems like it's…

jcobo1
- 1,065
- 1
- 18
- 34
1
vote
1 answer
Angular EventEmitter is not firing in parent component from child component
I know this is answered question and there are so many links too but my issue is strange happening, could you please guide me in right path. Thank you in advance for helping me.
Issue : Event emitter is not hitting in parent component function when…

Adithya
- 183
- 1
- 2
- 16
1
vote
3 answers
Passing data from children to parent with n children in Angular without emiting in each component along the way
If I have this components hierarchy in Angular:
And there is something happening in component F that B should know about.
One way I can do it is using emit() in F and pass it along the way up to A, but this will require me to emit event in each…

Avishay28
- 2,288
- 4
- 25
- 47
1
vote
3 answers
How can I correctly pass a value from a second level sub component to the parent component in this situation?
I am not so into Angular and TypeScript (I came from Java) and I have the following problem to solve. I don't know if the solution that I think to use is correct or if there are bettere solutions.
Basically I have a component named…

AndreaNobili
- 40,955
- 107
- 324
- 596
1
vote
1 answer
lodash debounce cancel() not stopping the debounce execution
I have written an angular application in which im making http calls on each modelChange event. I have used lodash _.debounce(). The issue is im not able to cancel these calls after the first successful execution of debounce.
…

Nithin P.H
- 671
- 1
- 9
- 29
1
vote
1 answer
Communicating Between two Components in Angular Using @Output and EventEmitter
Good day, Please i am new to Angular and i am working on an e-commerce cart and checkout page using Angular 9,
I would like to pass/communicate the quantity of each product entered in the input tag of the Cart Component to the Checkout page.
I have…
1
vote
3 answers
Angular 2 prevent router navigation on child component click
I have a template
and in my component here is the handler
handler() {
this.router.navigate('path');
}
I wanted do…

tsadkan yitbarek
- 1,360
- 2
- 11
- 28
1
vote
1 answer
Passing Object by Value (not by ref) over event emitter in Angular 8
I have an application, where I have to pass data from child component to parent component. The data is an object.
The problem what I am facing is the data is being passed by ref, which means when my Child Component model data changes, the Parent…

k.chinni66
- 43
- 8
1
vote
2 answers
Angular 9 : value is not updating while subscribe to emitter
I subscribed to emitter and I can see the output of this.productNumber in console. but it is not visible in the html file. I am using it like {{productNumber}} in html file.
constructor(private http : HttpClientService) {
…

sparsh610
- 1,552
- 3
- 27
- 66
1
vote
2 answers
Angular how to fix emit is not a function with Event-emitter
I'm trying to bind and @Output with a click event with an event emitter to log the data in from a different component.
I would need some guideline I think maybe not using the good approach
contactform.component.html
1
vote
1 answer
How to pass child output to app component containing router-outlet in Angular
I wanna emit a value from a sub component up to the app component. The component structure is like this:
index.html:
app.component.html:
app.component.ts:
@Component({
selector: 'app-root',
…

Jean D.
- 169
- 3
- 15
1
vote
2 answers
Asynchronous call in angular using event emitter and services for cross-component communication
cannot store the value received from subscribe method in a template variable.
photo-detail component
import { Component, OnInit, Input } from "@angular/core";
import { PhotoSevice } from "../photo.service";
import { Photo } from…

Arpan Banerjee
- 826
- 12
- 25