First, I say that did read Vojta's answer on similar question: Can one controller call another? but still have some things to clear.
What I need to do, is to write a controller (?) which opens a ui-bootstrap modal window (http://angular-ui.github.io/bootstrap/#/modal).
This popup can be opened from different pages, so I want this code to be in a separate shelter. The problem is, that this controller doesn't have view (that can trigger it to run), neither it has dedicated state (I use ui-router).
So I would want to write something like this
<div ng-click="angular.module('app').controller('popup').run();">
but of course, it's not going to happen.
I think service can be involved for that purpose, but I believe it's no good idea to use services for things which deal with user interaction. I believe controllers were designed for that.
Other option is to use a directive (which is supposed to deal with views by design), but what if I want to activate this directive from logic?
Please clarify how to properly deal with that kind of things. Thanks!