the issue here is that tabsChangedExpression() is defined in MyAddressesPage as it needs to reflect changes in the MyAddressesView, and thus unreachable from the HomePage. is it possible for the tabsChangedExpression() to be triggered from HomePage
import {Page} from 'ionic-framework/ionic';
import {FinderPage} from '../finder/finder';
import {MyAddressesPage} from '../my-addresses/my-addresses';
@Page({
templateUrl: 'build/pages/home/home.html'
})
export class HomePage {
constructor() {
this.tabMyAddressesRoot = MyAddressesPage;
this.tabFinderRoot = FinderPage;
}
}
Keep in mind there are two ways to use services --> globally and locally
this line: providers: [PizzaService],
creates a new Instance of your Service for your component.
If you want to share data between multiple components --> load the service in your base-component, inject it and add providers: [PizzaService],.
In every child-component do NOT add providers: [PizzaService], !!!
Import it, Inject it in your constructor and you will get the “global” instance and not a new one.