173 questions
2
votes
0
answers
63
views
Angular EventEmitter does not work at times
I'm having trouble with Angular's EventEmitter.
I don't know why, but when I create an element, the EventEmitter works correctly, but when I try to update an element, it doesn't works.
I have declared ...
1
vote
2
answers
830
views
Angular 18 Directive - Change color of button on hover
I'm learning how to create a simple custom directive using Angular 18 that can change the background color of an element. I'm referring to the code provided in the Angular documentation here but it ...
0
votes
2
answers
245
views
Parent component not receiving emit from child component
I have a child component <customer-add-form> that I'm using on a parent AddCustomerToClassComponent like this:
<customer-add-form #customerForm>
(addExistingCustomer)="...
1
vote
2
answers
89
views
Dynamic Component Outputs
I have 2 components in Angular, a parent and a child. I'd like the parent to be able to
pass an array of objects representing a clickable thing to the child
have the child component dynamically ...
0
votes
1
answer
63
views
Value is undefined with output event emitter in Angular
I have this angular code, which is a function called in emit of output.
addToCart(product: Product) {
alert(product.name);
}
And on my child component:
export class ProductListComponent ...
0
votes
2
answers
136
views
Why emit event in subscribe() is not emiting the data?
In my child component when I got a success from api call i am emiting data to parent component. But it's not working.
ChildComponent.ts
taskCompleted(taskId: number) {
const patchObject: ...
1
vote
0
answers
25
views
Angular: How to handle "Loader" & "child div with piechart of c3.js" in parent component when isLoading is received from child once api is subscribed
In the below code snippet, I am trying to handle the behaviour of a css loader, as soon as the data is fetched and isLoading is false the loader should stop and the desired pie chart from child ...
0
votes
2
answers
591
views
How do I pass the boolean value from child component to parent component so that I can use that value to enable/disable the sibling child component?
I have this parent component
-person.component.html
<div>
<main>
<address-list (addressPresent)="setPersonInfo($event)"></address-list>
<...
0
votes
2
answers
1k
views
My Angular's Output Event Emitter handler isn't triggered
I'm trying to change a part of my website when someone click on a svg picture.
That's why I used EventEmitter : to send the information of which part might be shown.
First, the code of my SVG ...
0
votes
0
answers
141
views
how to make isLogin true after login is done?
I am not being able to get isLogin value boolean value from login.component.ts after the login is completed.
I already tried @output EventEmitter. The problem with EventEmitter is that, it is called ...
0
votes
2
answers
91
views
Can't get Angular 2 table component to pick up on changes to array in shared service class
I want to display an array of data fetched by a service in a table component after the service is triggered by a button elsewhere. I've tried to do it using ngOnChanges() but that doesn't appear to ...
3
votes
2
answers
7k
views
EventEmitter vs signal
I just updated my application to Angular 16, which uses a lot of EventEmitter in a service to show where the user is in the app (setting Boolean values). signals were added in this release and I am ...
0
votes
1
answer
567
views
Spring - Angular - SseEmitter only works on local machine
I'm using event emitters to notify my clients of a change in their company. My production environment is on the google cloud.
For that purpose on login, I create for each one of them a SseEmitter via ...
-1
votes
1
answer
1k
views
Which would be better to use : EventEmitter or service? [closed]
I'm learning angular framework and I was wondering in this scenario which would be better to use. Child component gets 3 inputs ( name, date, age) but has no click event ( From what I gather you can ...
0
votes
0
answers
38
views
Angular js output event emitter method not getting called
The method triggered through output event emitter is not getting called.
This is my output event emitter:
@Output() onEditTask: EventEmitter<Task> = new EventEmitter();
This is my view:
<...