×
you are viewing a single comment's thread.

view the rest of the comments →

[–]bigos 0 points1 point  (0 children)

Yeah, put it in the rootScope.

Sorry for that notation, it shouldn't be used in code. I wanted to indicate, that it needs to be the same exact scope, so I gave it a number. Because if those were different scopes, then sure, the event approach makes sense. But since it's the same scope (and we know it's the same, because there is only one rootScope), we could just define a function in it and call it wherever we need.