How can we create a modal which can be shared among different pages.
Just create a page and use it from different pages.
I do this very often.
@shorstmann - Did you try it with ionic 4 modal component ?
Here explaining the requirement, pls let me know if not clear.
Scenario 1:
- I have created a page and imported into my app-routing module.
- I get error -
core.js:15724 ERROR Error: Uncaught (in promise): Error: No component factory found for shared. Did you add it to @NgModule.entryComponents?
Error: No component factory found for shared. Did you add it to @NgModule.entryComponents?
Scenario 2:
- When i add the page into calling module ts it works fine for that module
- But i try to import into another module the same page it throw error, Can’t be imported again as it was already imported into another module (Which is obvious) .
You have to add the new page into your app.module.ts in the imports. No need to have it in your routing module when just used as a modal.