SyntaxFix
Write A Post
Hire A Developer
Questions
One doesn't need to give id for the controller. It can simply called as following
angular.element(document.querySelector('[ng-controller="HeaderCtrl"]')).scope().myFunc()
Here HeaderCtrl is the controller name defined in your JS