Linked Questions

1 vote
0 answers
178 views

We use angular (11.2.14) and we updated rxjs library to 7.1.0. From that point we have this error "Property 'observers' does not exist on type 'EventEmitter'" in multiple places. According ...
Kristian Tot's user avatar
282 votes
7 answers
196k views

I am trying to implement something like a delegation pattern in Angular. When the user clicks on a nav-item, I would like to call a function which then emits an event which should in turn be handled ...
the_critic's user avatar
  • 12.8k
132 votes
3 answers
229k views

I know how to raise an event with the EventEmitter. I can also attach a method to be called if I have a component like this: <component-with-event (myevent)="mymethod($event)" /> When I have a ...
Per Hornshøj-Schierbeck's user avatar
61 votes
4 answers
173k views

I am trying to import component from one file another root component file. it give error as .. zone.js:484 Unhandled Promise rejection: Template parse errors: 'courses' is not a known element: 1....
Vishu's user avatar
  • 1,135
24 votes
5 answers
47k views

First I've created a User class: export class User { name: string; email: string; } Then I've got my CoreComponent which uses the FormInputComponent as well as creating a public user from the ...
Chrillewoodz's user avatar
  • 28.4k
34 votes
3 answers
33k views

export declare class EventEmitter<T> extends Subject<T> { /** * Creates an instance of [EventEmitter], which depending on [isAsync], * delivers events synchronously or ...
tom10271's user avatar
  • 4,689
71 votes
2 answers
36k views

There are three methods I have seen to manage change detection in Angular2. Observables @Injectable() export class TodosService { todos$: Observable<Array<Todo>>; private ...
B Hull's user avatar
  • 3,233
27 votes
2 answers
51k views

I am a beginner in angular 2 and I want to make my first app working. I am using TypeScript. I have the app.component.ts in which I have made a directive to another compoent called todos.component but ...
candino's user avatar
  • 1,347
29 votes
2 answers
32k views

I'm trying to get a button click in one component to put focus on an element on another component. (Frankly, I don't understand why this must be so complex, but I have not been able to implement any ...
DaveC426913's user avatar
  • 2,038
21 votes
2 answers
31k views

I am using Angular2 and have downloaded package.json from the official website. When I am trying to use "directives" inside @Component decorator I am getting this error. I have attached my code ...
test_124's user avatar
  • 1,403
14 votes
5 answers
24k views

In my app Im trying to dynamically change the title in my header component depending on the page that Im on, so In my header component I want to use a <h1>{{title}}</h1> and I want it to ...
Smokey Dawson's user avatar
22 votes
1 answer
12k views

Working off of Eric Martinez' answer from Angular 2 - Adding / Removing components on the fly, I want to limit the amount of components created. And then after deleting a component, I'm trying to emit ...
philip yoo's user avatar
  • 2,512
18 votes
1 answer
11k views

I'm having a hard time finding much in the way of examples/guides for using observables in an Angular2 service. There is stuff for html templates binding with EventEmitter but that doesn't seem right ...
Dennis Smolek's user avatar
8 votes
2 answers
49k views

I am emitting an event in my main component: main.component.ts this.sharedService.cartData.emit(this.data); Here is my sharedService.ts import { Component, Injectable, EventEmitter } from '@angular/...
Stef's user avatar
  • 717
14 votes
1 answer
6k views

Say there's ChildComponent which emits out an event called someEvent. Obviously, I can catch the event in ParentComponent declaring like, <child-component (someEvent)="onSomeEvent($event)"></...
DongBin Kim's user avatar
  • 1,999

15 30 50 per page
1
2 3 4 5