title: AngularJS function calls using arrays
body: <p>This AngularJS function isn't working quite the way I would expect it to:</p>
  
  <pre><code>app.controller('MainController', ['$scope', 'ForTHEOrder', function($scope, commence) { 
    commence.success(function(boolean) { 
      $scope.rabbitCat = boolean; 
      $scope.clownFox = boolean; 
      $scope.mongolFaun = boolean; 
      $scope.deerWolf = boolean; 
      $scope.stoatFire = boolean; 
      $scope.bearDragon = boolean; 
      $scope.deadWeasel = boolean; 
      $scope.n_nUrsulafox = boolean; 
    }); 
    commence.failure(function(boolean) { 
      $scope.rabbitCat = boolean; 
      $scope.clownFox = boolean; 
      $scope.mongolFaun = boolean; 
      $scope.deerWolf = boolean; 
      $scope.stoatFire = boolean; 
      $scope.bearDragon = boolean; 
      $scope.deadWeasel = boolean; 
      $scope.n_nUrsulafox = boolean; 
    }); 
  }]);
  </code></pre>
  
  <p>It should be passing an array into the function call, containing a set of objects, which are then utilised by the nested function call. However, that doesn't seem to be what's actually happening and when I try to run the code I get an error. I can post the HTML if need be, but what interests me is the action of the array. Does anyone have suggestions as to what the array is doing here?</p>
  
  <p>I am currently getting the following error message:</p>
  
  <pre><code>Error: $scope.success is not a function
  @http://www.orderofthemouse.co.uk/js/controllers/MainController.js:102:3
  e@http://ajax.googleapis.com/ajax/libs/angularjs/1.3.5/angular.min.js:36:338
  Ce/this.$get&lt;/&lt;/&lt;@http://ajax.googleapis.com/ajax/libs/angularjs/1.3.5/angular.min.js:75:387
  H/&lt;@http://ajax.googleapis.com/ajax/libs/angularjs/1.3.5/angular.min.js:59:19
  r@http://ajax.googleapis.com/ajax/libs/angularjs/1.3.5/angular.min.js:7:406
  H@http://ajax.googleapis.com/ajax/libs/angularjs/1.3.5/angular.min.js:59:2
  g@http://ajax.googleapis.com/ajax/libs/angularjs/1.3.5/angular.min.js:51:299
  g@http://ajax.googleapis.com/ajax/libs/angularjs/1.3.5/angular.min.js:51:316
  C/&lt;@http://ajax.googleapis.com/ajax/libs/angularjs/1.3.5/angular.min.js:50:414
  rc/d/&lt;/&lt;@http://ajax.googleapis.com/ajax/libs/angularjs/1.3.5/angular.min.js:17:477
  Me/this.$get&lt;/k.prototype.$eval@http://ajax.googleapis.com/ajax/libs/angularjs/1.3.5/angular.min.js:125:116
  Me/this.$get&lt;/k.prototype.$apply@http://ajax.googleapis.com/ajax/libs/angularjs/1.3.5/angular.min.js:125:330
  rc/d/&lt;@http://ajax.googleapis.com/ajax/libs/angularjs/1.3.5/angular.min.js:17:435
  e@http://ajax.googleapis.com/ajax/libs/angularjs/1.3.5/angular.min.js:36:338
  rc/d@http://ajax.googleapis.com/ajax/libs/angularjs/1.3.5/angular.min.js:17:356
  rc@http://ajax.googleapis.com/ajax/libs/angularjs/1.3.5/angular.min.js:18:151
  Gd@http://ajax.googleapis.com/ajax/libs/angularjs/1.3.5/angular.min.js:16:463
  @http://ajax.googleapis.com/ajax/libs/angularjs/1.3.5/angular.min.js:249:238
  a@http://ajax.googleapis.com/ajax/libs/angularjs/1.3.5/angular.min.js:164:4
  gf/c@http://ajax.googleapis.com/ajax/libs/angularjs/1.3.5/angular.min.js:32:280
  </code></pre>
  
  <p>The HTML code requested is as follows:</p>
  
  <pre><code>&lt;!doctype html&gt;
  &lt;html&gt;
    &lt;head&gt;
      &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8"&gt;
      &lt;title&gt;The Order of the Mouse&lt;/title&gt;
      &lt;meta charset="utf-8"&gt;
      &lt;meta name="viewport" content="width=device-width, initial-scale=1"&gt;
      &lt;link rel="icon" type="image/jpg" href="./ico/favicon.jpg"&gt;
      &lt;meta name="description" content="Psychological horror/detective/spiritual RPG set the medieval, magical future world of 2079; Web-Based"&gt;
      &lt;meta name="keywords" content="RPG, Horror, Detective, Order of the Mouse, Rabbit-Cat, Dragon-Bear, Clown-Fox, Deer-Wolf"&gt;
      &lt;link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css"&gt;
      &lt;link rel="stylesheet" href="/css/style.css"&gt;
      &lt;script src="./vendor/jquery-1.11.3.min.js"&gt;&lt;/script&gt;
      &lt;script src="./vendor/bootstrap.min.js"&gt;&lt;/script&gt;
      &lt;script src="./vendor/underscore.js"&gt;&lt;/script&gt;
      &lt;script src="./vendor/backbone.min.js"&gt;&lt;/script&gt;
      &lt;script src="./vendor/backbone.marionette.min.js"&gt;&lt;/script&gt;
      &lt;script src="./react/build/react.min.js"&gt;&lt;/script&gt;
      &lt;script src="./react/build/react-dom.min.js"&gt;&lt;/script&gt;
      &lt;script src="http://www.wavepot.com/build.js"&gt;&lt;/script&gt;
      &lt;script src="http://www.wavepot.com/app.js"&gt;&lt;/script&gt;
      &lt;script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.3.5/angular.min.js"&gt;&lt;/script&gt;
      &lt;link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet" /&gt;
      &lt;link href='https://fonts.googleapis.com/css?family=Roboto:500,300,700,200' rel='stylesheet' type='text/css'&gt;
      &lt;link href="css/main.css" rel="stylesheet" /&gt;
    &lt;/head&gt;
    &lt;body ng-app="myApp"&gt;
      &lt;div class="header"&gt;
        &lt;div class="container"&gt;
          &lt;h1&gt;&lt;/h1&gt;
        &lt;/div&gt;
      &lt;/div&gt;
  
      &lt;div class="main" ng-controller="MainController"&gt;
        &lt;div class="container"&gt;
  
          &lt;h1&gt;{{ title }}&lt;/h1&gt;
           &lt;h2&gt;{{ placeholder }}&lt;/h2&gt;
  
          &lt;div ng-repeat="character in characters" class="col-md-6"&gt; 
                  &lt;div class="thumbnail"&gt; 
                      &lt;img ng-src="{{  }}"&gt; 
                      &lt;p class="name"&gt;{{ character.name }}&lt;/p&gt; 
                      &lt;p class="name"&gt;{{ character.age }}&lt;/p&gt;
                      &lt;p class="url"&gt;&lt;a href="http://orderofthemouse.co.uk/"&gt;{{ character.url }}&lt;/p&gt;&lt;/a&gt;
                      &lt;p class="coolness"&gt;{{ success.rabbitCat }}&lt;/p&gt; 
                      &lt;p class="warmness"&gt;{{ failure.rabbitCat }}&lt;/p&gt; 
                      &lt;div class="HP"&gt;
                          &lt;p class="Up" ng-click="plusOne($index)"&gt; {{  }} &lt;/p&gt;
                          &lt;p class="Down" ng-click="minusOne($index)"&gt; {{ }} &lt;/p&gt;
                      &lt;/div&gt;
                  &lt;/div&gt; 
                  &lt;/div&gt;
  
        &lt;/div&gt;
      &lt;/div&gt;
  
      &lt;div class="footer"&gt;
        &lt;div class="container"&gt;
          &lt;h2&gt;&lt;/h2&gt;
          &lt;img style="display: none" src="" width="" /&gt;
        &lt;/div&gt;
      &lt;/div&gt;
  
      &lt;script&gt;
      import sin from '&lt;redacted&gt;'; 
      import { noise } from '&lt;redacted&gt;';
  
      export function dsp(t) {
      return (sin(t, 440) + noise()) * 0.1;
      }
      &lt;/script&gt;
  
      &lt;audio controls autoplay&gt;
         &lt;source src="DozyOuija.ogg" type="audio/ogg"&gt;
         &lt;source src="DozyOuija.mp3" type="audio/mp3"&gt;
         &lt;p&gt;Your User Agent does not support the HTML5 Audio element.&lt;/p&gt;
      &lt;/audio&gt; 
  
  
  
      &lt;!-- Modules --&gt;
      &lt;script src="js/app.js"&gt;&lt;/script&gt;
  
      &lt;!-- Controllers --&gt;
      &lt;script src="js/controllers/MainController.js"&gt;&lt;/script&gt;
      &lt;script&gt;
  &lt;!-- Analytics --&gt;
  &lt;!-- ANALYTICS REDACTED --&gt;
      &lt;/script&gt;
    &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Let me know if anyone needs further details to help them get to the bottom of the problem.</p>