I am trying to show a modal in my app which previously worked without any issues. The page I’m trying to launch it from doesn’t appear to matter because I have the same result in any page, even the ‘legal’ pages where there isn’t any code really. I’m about 100% sure I have the modal component correctly declared in app.module.ts and I’m launching it correctly in my page file(s). Anyone have any experience with this?
page1.page.ts
// ...
import { GatherInfoComponent } from 'src/app/Modals/gather-info/gather-info.component';
// ...
async gatherInfo() {
console.log('Open Modal...');
const modal = await this.modal.create({
component: GatherInfoComponent,
componentProps: { user: this.us }
});
return await modal.present().catch((error) => {
console.log(error);
});
}
app.module.ts
// ...
import { GatherInfoComponent } from 'src/app/Modals/gather-info/gather-info.component';
// ...
@NgModule({
declarations: [
// ...
GatherInfoComponent
],
entryComponents: [
// ...
GatherInfoComponent
],
p.s.
As a test I created a new Ionic4 project with nothing but a test modal and it worked without a problem; so I don’t think this is an Ionic issue.