Modal instance reference


#1

I have some modals which I would prefer to isolate from their parent scope. Each modal has it’s own controller. Is there a preferred method for that controller to access the ‘modal’ object instance itself, thus being able to call hide() on itself, without needing to rely on a variable from the parent scope?


#2

Never mind. I looked in the ionic source and I see that if I don’t pass in a scope when setting up the modal, it adds the modal reference to a new, isolated scope, which is exactly what I needed.


#3

Glad you figured it out, this is something that should be in the docs though. I believe @adam and @andytjoslin are working on getting auto-generated docs soon, so hopefully this will be clearer in the near future!