{"id":1760,"date":"2022-08-30T15:19:13","date_gmt":"2022-08-30T15:19:13","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2013\/12\/01\/some-angularjs-examples-not-working-in-jsfiddle-and-plunker-collection-of-common-programming-errors\/"},"modified":"2022-08-30T15:19:13","modified_gmt":"2022-08-30T15:19:13","slug":"some-angularjs-examples-not-working-in-jsfiddle-and-plunker-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2022\/08\/30\/some-angularjs-examples-not-working-in-jsfiddle-and-plunker-collection-of-common-programming-errors\/","title":{"rendered":"Some angularjs examples not working in jsfiddle and plunker-Collection of common programming errors"},"content":{"rendered":"<p>JSFiddle in particular has always been difficult to get working with AngularJS. The HTML section isn&#8217;t meant to take an entire HTML document. Instead, you need to configure the workspace to work with Angular following these steps:<\/p>\n<ol>\n<li>Under external resources, add the Angular script (remember to click the + icon)<\/li>\n<li>Under Fiddle Options change the <code>body<\/code> tag to include <code>ng-app<\/code> like so:<\/li>\n<\/ol>\n<p>That should get you started. If you don&#8217;t mind using an older version of Angular (1.1.1), you can select it from the &#8220;Frameworks &amp; Extensions&#8221; drop down and change the 2nd drop down from <code>onLoad<\/code> to <code>No wrap - in<\/code> .<\/p>\n<p>See here for a working example from the docs: http:\/\/jsfiddle.net\/jPtb3\/<\/p>\n<p>And here for the optional approach using 1.1.1: http:\/\/jsfiddle.net\/5nA2H\/<\/p>\n<p><strong>Update<\/strong><\/p>\n<p>There&#8217;s some misinformation in the comments.. The docs ARE actually creating <code>angular.module<\/code> for you, but they&#8217;re passing in an empty dependency. So you can either remove <code>=\"App\"<\/code> (not best), or you fix the <code>angular.module<\/code> declaration by removing the empty dependency (best) like so:<\/p>\n<pre><code>angular.module('App', []);\n<\/code><\/pre>\n<p id=\"rop\"><small>Originally posted 2013-12-01 09:11:06. <\/small><\/p>","protected":false},"excerpt":{"rendered":"<p>JSFiddle in particular has always been difficult to get working with AngularJS. The HTML section isn&#8217;t meant to take an entire HTML document. Instead, you need to configure the workspace to work with Angular following these steps: Under external resources, add the Angular script (remember to click the + icon) Under Fiddle Options change the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1760","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/1760","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=1760"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/1760\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=1760"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=1760"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=1760"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}