Is possible to create a ionicModal inside a Angular Factory?

The title is auto-explanatory… I’m newbie in Angular

Here is example: http://cdpn.io/Kavet

Nice example. I’ve never thought of doing this before.

There were a few bugs so I modified it a bit.