Using window opener for a function in AngularJS Using window opener for a function in AngularJS angularjs angularjs

Using window opener for a function in AngularJS


Try this, add $window as dependency to controller.

    myApp.controller('MyCtrl', function($scope, $window){        $window.inviteCallback = function() {            alert('hi');        }               });

And call inivteCallback using,

window.opener.inviteCallback();