I am new to AngularJS and working my way through some documents and tutorials to learn. My question is in reference to Egghead\'s video series, this video in particular, dem
Try using No Wrap - In Head or No wrap - in body in your fiddle:
Working fiddle: http://jsfiddle.net/Q5hd6/
Explanation:
Angular begins compiling the DOM when the DOM is fully loaded. You register your code to run onLoad (onload option in fiddle) => it's too late to register your myApp module because angular begins compiling the DOM and angular sees that there is no module named myApp and throws an exception.
By using No Wrap - In Head, your code looks like this:
Your script has a chance to run before angular begins compiling the DOM and myApp module is already created when angular starts compiling the DOM.