TABS: load content of tab from another tab

Hi guys,

In m first load of the app, I want to load an ion-list from other tab that currently tab, for example, when load Tab1 I needed load the ion-list of Tab2. But when I opened this tab the content of the list dont’show.

Any idea?

Sounds like you want to centralize the list into a service provider that can be injected in multiple places.

What I want is to update a list (ion-item) in my component list.ts / list.html from tabs.ts component.

From tabs.ts I call the service that brings me the data from the list, but I do not know how to load it into my list.ts, where I have the ngFor with the list

Given only what I’ve heard so far, I would have the service expose an Observable<Thingy[]> (probably some sort of Subject). Pages that care when this list of thingies is modified would subscribe to this and update their own copy of a Thingy[] property accordingly. The mechanism for calling next() on the Subject depends on the rest of your design.

I have this


 constructor(public listPage: ListPage){


export class ListPage {
   cars: Cars[] = [];

   getCars(){ = arrCars;


 <ion-item-sliding *ngFor="let car of cars">

      <ion-item >

The problem is that when call this.getCars() from tabs.ts and after open the tab of cars, I didn’t see nothing

No. Don’t ever inject one page into another. It makes no sense.

I agree to @rapropos. Do not use it like that.

But you insist of this, you can add it to localStorage as window.localStorage[‘Cars’];
Or you can add list as a parameter I believe like;

<ion-tab [root]="tab1Root" tabIcon="search" [rootParams]="Cars"></ion-tab>