Provider import creates new instance after update to Beta 11

Hi,
when I import provider into my modal page it creates new instance and I don’t want to. (with normal page it works fine) . Before update it also works fine. Any ideas anyone? Creating modal page:
constructor(public modal: ModalController) { } openFilter() { let filterModal = this.modal.create(FilterPage); filterModal.present(); }
in modal:
import { FilterProvider } from '...'; constructor(private filterProv: FilterProvider) { }
Thanks :slight_smile:

1 Like

I am seeing the same issue. Works fine in normal page but in Modal I cannot access any data that I stored in the provider.
This issue broke one of my critical filter component.

2 Likes

anyway fixing it? I m struggling the same thing.

I also had a global-service in app.ts storing gobal variables to be shared by all depending child components.
after updating to beta 11 it throws me errors and must create new instances in [providers] making it impossible to share global variables.

You can pass data when creating the modal. Won’t that solve your problem?

let profileModal = this.modalCtrl.create(Profile, { userId: 8675309 });