Some angularjs examples not working in jsfiddle and plunker-Collection of common programming errors

JSFiddle in particular has always been difficult to get working with AngularJS. The HTML section isn’t meant to take an entire HTML document. Instead, you need to configure the workspace to work with Angular following these steps:

  1. Under external resources, add the Angular script (remember to click the + icon)
  2. Under Fiddle Options change the body tag to include ng-app like so:

That should get you started. If you don’t mind using an older version of Angular (1.1.1), you can select it from the “Frameworks & Extensions” drop down and change the 2nd drop down from onLoad to No wrap - in .

See here for a working example from the docs:

And here for the optional approach using 1.1.1:


There’s some misinformation in the comments.. The docs ARE actually creating angular.module for you, but they’re passing in an empty dependency. So you can either remove ="App" (not best), or you fix the angular.module declaration by removing the empty dependency (best) like so:

angular.module('App', []);