Hello Team,
My AngularJS Controller says function is not defined, kindly help.
(function () {
}
}
])
}).call(anguler);
Hello Team,
My AngularJS Controller says function is not defined, kindly help.
(function () {
}
}
])
}).call(anguler);
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Vishal JoshiPosted Nov 5, 2023, 6:02 AM
Hello Emma,
Looks like a minor typo issue. it should be angular not anguler.
Please try the code below it should work.
Thanks
Vishal Joshi
Prasad RaveendranPosted Nov 4, 2023, 3:54 AM
It seems there's an issue in the code you've provided. It looks like there might be a typo in the usage of AngularJS.
AngularJS uses the
controllermethod to define controllers. Here's a basic example of how you might define an AngularJS controller:Ensure that:
angular.moduleis created with a module name.controllermethod is used within the module to define the controller.The error you're encountering might be due to an undefined function or a missing reference to the function inside the controller definition. Also, the
.call(anguler)at the end of your code is incorrect; it seems to have a typo (angulerinstead ofangular).Make sure your code follows the standard AngularJS controller definition pattern and correct any typos in the code. This will likely resolve the "function is not defined" error you're encountering.
If you are planning new application development, I would recommend latest frameworks such as Angular, React, VueJS