İonic-v5 Events in @ionic/angular Alternative

Which method can I use instead of the event used in ionic-v3 ?

// send


Look at observables here.

They are a better and more generic want of creating a pub/sub system.

1 Like

Using an event provider has solved for me. Here’s an example.

import { Injectable } from ‘@angular/core’;
import { Subject } from ‘rxjs’;

export class EventsProvider {

private dataCompanySubject = new Subject();

publishDataCompany(data: any) {;

observeDataCompany(): Subject {
return this.dataCompanySubject;

And use like this



this.eventsProvider.observeDataCompany().subscribe((data: any) => {…

1 Like

I want to receive data sent on page 1 on page 2. And the data format is (key, value). How can I do it?

Follow @daniel_rf121 recommendation. Read more here

And also read on about observables…

That should get you started.

As I explained above, you can pass objects, and all pages that are listening to this observable, will receive this value.