Argument ... is not a function, got undefined
angularjs, javascript
Solution
I had exactly the same error: `argument 'HelloCtrl' is not a function`, got undefined.
Turns out I had a syntax error in my `hello.js` file... a missing comma in an array definition, inside `HelloCtrl()`.
I added the comma, and then everything started working!
Hope this helps.
Problem
I'm playing with AngularJS, but I'm getting an error message: `Argument 'Controller' is not a function, got undefined` Here's the JSFiddle, and HTML code: ``` <h2>Hata's Tree-Like Set</h2> <div ng-app ng-init="N=3;" ng-controller="Controller"> <input type="range" min="1" max="10" step="1" ng-model="N"> <div class="tree"></div> </div ``` Then I define the `Controller` function in JavaScript, which is not registering for some reason. ``` function Controller($scope){ $scope.$watch("N", function(){ ... });} ```