I read this link: AngularJS access scope from outside js function and I tried to get access to the controller but I didn\'t setup my index.html like the fiddlejs example. >
You can check below code snippet here we are calling the loginwidget scope function in javascript function. function myFunction(){ angular.element(document.getElementById('parentController')).scope().myFunction(); }
Note: Here you need to define your function in parentController.