title: Simple AngularJS example with a module and controller in jsFiddle
body: <p>This probably a combo jsFiddle/Angular question, but I'm trying to learn me some basic Angular and I'm not sure why it only works when I include the controller JS in the HTML pane.  <a href="http://jsfiddle.net/skube/E9bU5/2/" rel="nofollow">jsFiddle here</a></p>
  
  <p>Basically the following works:</p>
  
  <pre><code>&lt;div ng-app="myAppModule" ng-controller="someController"&gt;
  &lt;!-- Show the name in the browser --&gt;
   &lt;h1&gt;Welcome {{ name }}&lt;/h1&gt;
  
  &lt;p&gt;made by : {{userName}}&lt;/p&gt;
  &lt;!-- Bind the input to the name --&gt;
  &lt;input ng-model="name" name="name" placeholder="Enter your name" /&gt;
  &lt;/div&gt;
  &lt;script&gt;
  var myApp = angular.module('myAppModule', []);
  myApp.controller('someController', function($scope) {
      // do some stuff here
      $scope.userName = "skube";
  });
  &lt;/script&gt;
  </code></pre>
  
  <p>But if I try to move the JS within the script tag to the JavaScript pane, it fails. </p>