I came across a code snippet similar to this one in a Github project, and it seems to be functioning properly.
function myFunc($par1, $par2) {
//some logic here
}
angular
.module('myApp')
.config(['$par1', '$par2', myFunc]);
Now, I'm attempting to implement it into some code that needs updating. In this case, the function is defined as follows:
module.exports = /* @ngInject */ function myFunc($par1, $par2) {
However, I keep encountering an error which states:
Uncaught ReferenceError: myFunc is not defined
So, how can I reference myFunc
when it's declared within module.export
?