Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

199
Views
EventEmitter está en desuso y no debe usarse

En AngularDart 3.0.0, EventEmitter está en desuso. Entonces, ¿cómo enviar un evento del componente secundario al principal?

Antes de la actualización se parece a:

 @Component( selector: 'my-test', templateUrl: 'test.component.html' ) class TestComponent { @Input() String name = ''; @Output() EventEmitter<String> onNameChange = new EventEmitter<String>(); } ... onNameChange.emit('New Name'); ...

Ahora necesito usar Stream y StreamController. ¿Alguien puede dar un ejemplo?

about 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Solo usa un StreamController normal

 final _onNameChangeController = new StreamController<String>.broadcast(); @Output() Stream<String> get onNameChange => _onNameChangeController.stream;

.broadcast es opcional. Se requiere para permitir múltiples suscriptores.

Ver también https://www.dartlang.org/articles/libraries/broadcast-streams

about 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!