I tried that but as soon as I build and run it on the iPhone, it dose not work.
There is always the following error message: Error: ‘undefined’ is not an object (evaluating ‘a.modal.show’)
On iPhone this one: Failed to load resource: The requested URL was not found on this server.
file:///var/mobile/Applications/A4BECCFB-E0FD-4F62-8082-AA540E07D24E/myApp.app/templates/overlays/modal.template.html
The path is wrong because the template is inside www/…
I was just having a similar problem where my modal was fine in browser via ionic serve, but was unresponsive after running ionic build and running my app on hardware.
Basically, watch your paths. My modal html was being referenced as ‘/templates/modal.content.html’ when it should have been ‘templates/modal.content.html’ (depending on your directory structure) since the root on web isn’t the root on iOS or Android