Passing value to app.component.ts

Excelente me sirvio esta respuesta

I’m guessing from the fact that you "heart"ed the post above yours that you chose to use the Events strategy. I would urge you to rethink that decision. I have been saying for years that anything Events can do can be done in a better way using Observables, and another factor to take into account is that Ionic apparently also eventually came around to that same conclusion, as they dumped Events entirely.

i’m facing the same issue . but unfortunately there were no satisfactory solutions.
also saw that topic too, which says the same to make a service :
How to pass data to appcomponent page from other page

but i need some solution with app component so i don’t have to do major changes. or at least some demo example to do so.

i have a profile edit page where user can update his profile info .for example user edits user name now the API call updates the data and also i save the updated data to local storage. this local storage contains the updated name too, which i want to display on side menu and this menu is in app component.

In your app.module.ts

import { AppComponent } from './app.component'; //if you don't have
@NgModule({
  declarations: [AppComponent,...], //if you don't have
...
})

And in your mypage.page.ts (or whatever your page is)

import { AppComponent } from './app.component';
...
...
export class MypagePage{
constructor(private appcomponent:AppComponent,...){}
your_variable='';
your_method(any_arg:any){
this.appcomponent.your_appcomponent_member=any_arg;
}
}

And in your app.component.ts

export class AppComponent{
...
...
your_appcomponent_member='';
}

thats it.

Please ignore the previous post. DI is for services, not for components. Trying to inject one component into another is a recipe for confusion and pain.