I have a basic understanding of Django
and JS
and recently I started learning Angular.js
. I wrote code for showing hardcoded json
using Angular
and failed. I got the following error:
Uncaught TypeError: Cannot read property 'module' of undefined at line 10 of django-angular.js
I went through the file and saw this line:
var djng_forms_module = angular.module('ng.django.forms', []);
I don't know what the error means by undefined. I went through some of the links having similar problems but with no success.
Have you forgotten to load AngularJS before your script? The error means that the object angular
hasn't been seen by Javascript yet and therefore module
cannot be called on it.
(that's actually a simplification but it should illustrate what's going on)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With