Cannot reload own componets when pop() to tab from modal


#1

Hi.

I have an own component in a tab, this push to another page to add/modifi/delete component.
When return, does not refresh, even calling events, inside components, dont refresh the number of elements.passed by @input.

I’m stuck on this, very desesperate.

Thanks in advance.

ionic-angular 3.6.0


#2

Nobody is going to be able to say anything useful without code.


#3

main Problem, I cannot refresh tab view after add/delete/modify some of the components.

It has 4 own components:
cards-grid
favorite
image-card
slide-button-3d

cards-grid holds image-card (4 of it at the example below)
image-card holds favorite and slide-button-3d

App Tree:

Secuence of the problem:

First load with 4 components.
Everything look right in position.

Click on a component to modify:
The code:

The modify/delete view:

updateting

Update and returning:
Te code:

Returning to main view, lost styles (everything is shifted to left and hearth too right), and for update the component have to fire an event wich is catched by ‘cards-grid’ to force reload all the components.
The fired event fix the problem of update text or image-card quantity, but not styles.

Thanks in advance


#4

If you don’t get any better answers, I would start by stopping trying to interact with the root NavController from anywhere other than the app component. Perhaps that will organically fix your problem.


#5

this fix the style, but dont fix the refresh of the components (add/delete/modify) when dismiss the modal page.

  constructor(public modalCtrl: ModalController) { }

   AddEditDevice(userDevice) {
     let myModal = this.modalCtrl.create(this.devicePage,
                         { rootNavCtrl: this.rootNavCtrl,
                            userDevice:  userDevice});
  }

#6

I’m objecting to the existence of this parameter. I think it’s a bad idea to be messing with other components’ NavControllers, and I can certainly imagine it causing problems such as you describe here.