I am working on creating AngularJS SPA. Since I'm a little new to the structure, I get errors all the time when I launch the application, and I see that the exception is thrown in the console. However, I pretty much believe that these exceptions are extremely useless, since they do not tell me where the problem is (e.g. file, provider type or line number). The Chrome console just shows me line 36 of the angular.js file, which doesn't help.
If I have made changes to several files since the last run, it becomes a mowing hunt, looking for what exactly Angular is happy about.
For example, I apparently referenced the dependency for $ rootScope somewhere, but who knows exactly where. Here is my current exception url: http://errors.angularjs.org/1.2.15/$injector/modulerr?p0=home&p1=Error%3A% 20% 5B% 24injector% 3Aunpr% 5D% 20http% 3A% 2F % 2Ferrors.angularjs.org% 2F1.2.15% 2F% 24injector% 2Funpr% 3Fp0% 3D% 2524rootScope% 0A% 20% 20% 20% 20at% 20Err
Am I doing it wrong? Is there any tool I don't know about that simplifies this whole javascript development process?
Edit: for the answer I received, I decided that the problem is due to an incorrect link to another service and has nothing to do with $ rootScope. And I only realized this after commenting $ rootScope throughout the application and finally got an error saying the name of my function. Then I took this and looked at every instance of this in my logic until I found a problem.
But it seems wildly ineffective. Surely there is a better way than to comment on large pieces of the program, just cut down on all the places where the problem may be hiding?
source
share