Quantcast
Channel: Ionic Forum - Latest posts
Viewing all articles
Browse latest Browse all 229893

How to pass updated user name from edit profile page to app component's side menu?

$
0
0

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.


Viewing all articles
Browse latest Browse all 229893

Trending Articles