Angular JS Up & Running: Chapter 3. I have done all it says in this chapter but when I run karma run I do get errors instead of successful response:
Safari 7.0.6 (Mac OS X 10.9.4) ERROR
ReferenceError: Can't find variable: angular
Which seems logical because Angular.js is never called/referenced or mentioned anywhere. So my question: What did I miss?
Help get this topic noticed by sharing it on Twitter, Facebook, or email.
I have forwarded your question on to our Book Tech staff, so they can help you find a solution. If you ever have any questions or issues with the content of a title, you can also contact them directly at firstname.lastname@example.org or call them at:
1-707-827-7019 (outside the USA)
7:30 am to 5:00 PST
Thanks for trying out the book.
With chapter3, can you please check your karma.conf.js? That seems to be the most likely culprit. If you look at pg 39 of the book, which has the karma.conf.js code, you will see a line which says
This should ensure that the angular.min.js is loaded before the controller.js is loaded.
You can grab the correct version of the karma.conf.js file from https://github.com/shyamseshadri/angu... to make sure there are no problems.
Or you can grab the entire chapter3 folder from https://github.com/shyamseshadri/angu...
Also, ensure you are running karma from the same folder as the config file, or point to it manually. This could be the other problem, that the karma.conf.js is in a different folder, or the paths in it are not correctly mentioned.
Let me know if this helped.