I need to kick off an angular event in a child browser window from a parent. My first thought was if I had the module name I should be able to get a reference to the $rootScope
from the angular global object but I have not been able to get that to work.
Does anyone know the best way to reference the $rootScope
object from outside the context of angular?
thanks in advance.
If you have an id on your ng-app
<div id="app-container" ng-app="myApp">
You can get the $rootScope
by:
angular.element('#app-container').scope()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With