I’ve been working with $ionicModal and i’ve found some problems trying to insert dynamic content on them.
I have a controller “controller1” which has the $ionicModal module that opens a modal.
The modal uses a controller called “controller2”, and in this second controller I have a Scope var which is printed on the modal.
The thing is that i want the modal to change the scope value depending on the button the user clicks on my view (a function fired on controller1). For example “openModal(1)” and so…
I’ve tried to use rootscope, and an external service to share vars between the controllers with no luck.
I’ve also tried to inject the $ionicModal service on “controller2” and move the function “openModal” to the controller 2, and use "ng-controller=“controller2” on the buttons, but it has entered on a bucle that has crashed my crome several times before finding what the heck was happening.
Is the modal intended to use only with static content?
If someone could give me a hint about updating content inside of a modal with and external controller. I would be very appreciated.