Using the web version for preview, I’ve created a simple widget that basically encapsulates an and adds a clickable icon. That icon should open a modal. The widget is meant to be re-used in multiple pages. The modal that opens is the wrong one.
Can I invite you to have a look at the code I posted on stack overflow please?
I’m running in circles and I’m sure I’m missing something obvious. Thanks in advance for your attention!
It isn’t recommended to put both template and controller in the same file like that. I’d separate them out as a first step. Also a separate file for the module. Cleaner code management if each file has exactly one job.
I don’t see the code for MedSearchModule, nor for the root page. Also, it’s hard to understand what you are doing because your imports do not follow recommended directory structure. So I think you have a deeper problem than a modal not working. I think you should decide to follow either the Angular recommended directory structure or the Ionic recommended directory structure, and then do that. Right now, your code looks like one big gamush to me.
Thanks for your attention Indeed, I forgot to specify the filenames. They should be matching the recommended naming schemes. I’ve updated the question with the filenames.