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
0
votes
0 answers
How to prevent any keyboard events and their default behavior on element in Angular 6
I am trying do prevent any keyboard activity on Angular Mat Header. I want to block keyboard navigation, entering steps using header. I want to use buttons only
How to stop any keyboard activity on that element as preventDefault() does not…

Andyally
- 863
- 1
- 9
- 22
0
votes
2 answers
Modifying text inside textChange nativescript
I'm currently using a HostListener to be able to format user text at the same time that the user is typing it. For example if the user is typing a phone number I want to be able to add format just as needed. If the string is 0000 I want the text to…

Felipe Centeno
- 2,911
- 1
- 21
- 39
0
votes
1 answer
angular6 material event emitter not working
I am trying to implement Event Emitter such that when a todo is inserted into the db, it is added to the list of todos. But it does not work. Please find the code below:
The todoinput component(todo.input.html): component which adds a todo to the…

Ashy Ashcsi
- 1,529
- 7
- 22
- 54
0
votes
1 answer
Angular component property view not updating when function emits output event
Angular component variable is not updating in the view if the component method generates an output event. Variable in focus is 'qMode',
Function with generating output event (NOT UPDATING VARIABLE)
save() {
if (this.questionForm.valid) {
…

Lokinder Singh Chauhan
- 2,326
- 1
- 20
- 23
0
votes
0 answers
Angular: a directive to handle the end of custom event handler execution
My directive has a custom event, say my-event used like:
and user handles the event like:
async handle(e) {
await handleEvent(e);
}
Then I like to perform a specific action after the event is handled by…

bob
- 2,674
- 1
- 29
- 46
0
votes
1 answer
Dropdown component not having effect in Chromium browser
I have a simple pie chart with a dropdown component (based on

Gitnik
- 564
- 7
- 26
0
votes
1 answer
Angular-5 how to get data from multiple children to parent using single event?
I have a scenario where i have 3 tabs in my web page, where in tab content area three different components loads on activation of each tab(say components 'ABC','PQR','XYZ'). In the main page in which tabs are present i have to show some header data…

Anonymous
- 1,726
- 4
- 22
- 47
0
votes
2 answers
How to show ngx-loading animation only to router-outlet?
I have a layout component with the following template,
router-outlet: this shows the various screens depending…

Anil
- 1,748
- 8
- 32
- 67
0
votes
1 answer
Angular 5 - Event emitter (Property 'update' does not exist on type ....)
I've got a component that I want to update when a person's name changes by emitting an event. My problem is the code doesn't compile because of an error. This is my code
ApplicationFormComponent
@Output() nameChange = new EventEmitter();
…

nick gowdy
- 6,191
- 25
- 88
- 157
0
votes
2 answers
How to notify dump component when a http call is failed?
Currently I have a smart component products.component.ts and one dump component products-create.component.ts. The dump component emits an event to the smart component when the user submits on create button.
The products.component.ts makes a http…

JPS
- 2,730
- 5
- 32
- 54
0
votes
1 answer
Listening to event from angular 4 component in angularjs controller
I'm working on a hybrid angular app. I need to listen to an event (an observable may be ) in the angularjs controller and the event would be triggered by angular 4 component. Is there any way we could actually accomplish this ?

Kalyan
- 3
- 3
0
votes
1 answer
How exactly works this Angular 5 example handling comunication between a parent and child component?
I am starting with Angular and I have some doubts about how exactly works this example related to comunication between a parent and a child component.
So I have this PARENT COMPONENT. This component is used to show a list of items (each item is…

AndreaNobili
- 40,955
- 107
- 324
- 596
0
votes
2 answers
Angular2: Unable to emit data to other component. Backend service being called Twice
I have a requirement where ngOnInit, I am extracting the query params from URL, preparing a url for making backend api call something like http://localhost:8080/myapp/video0=5&video1=6 and emitting the data received to be used in other…

roger_that
- 9,493
- 18
- 66
- 102
-1
votes
1 answer
Which would be better to use : EventEmitter or service?
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 still emit without such a event in said component)…

BananaTea
- 27
- 4
-1
votes
1 answer
How to test custom event emitter service in Angular 12
I have implement component communication using emit emitter service.
service.ts
import { EventEmitter, Injectable } from '@angular/core';
@Injectable({
providedIn: 'root'
})
export class BroadcastService {
updateDetails = new EventEmitter();
…

Suhail Ahmed
- 157
- 2
- 15