I am attempting to utilize the eval
method in JavaScript to invoke a function within angular.js. I have the function's name stored as a string.
This is what I tried:
$scope.$eval("$scope.drawFactory.draw")({},$scope.paint);
However, an error message is displaying:
TypeError: $scope.$eval(...) is not a function
What is the correct approach to accomplish this task?