title: 'ListCtrl' is not a function, got undefined
body: <p>not quite sure what this is about but I had something that worked just fine outside of Monaca, and once in Monaca I get this:
  Error: [ng:areq] Argument 'ListCtrl' is not a function, got undefined</p>
  
  <p>Here is the code: </p>
  
  <pre><code>&lt;script&gt;
  var app = ons.bootstrap('propertyDeal', ['onsen']);
  app.factory('Property', function () {
  
      /**
      * Constructor, with class name
      */
      function Property(newProperty) {
          // Public properties, assigned to the instance ('this')
          this.purchasePrice = newProperty.pprice;
          this.marketValue = newProperty.mv;
          this.stampDuty = newProperty.stamp;
          this.sourcingFee = newProperty.sourcing;
          this.legaFee = newProperty.legal;
          this.otherFee = newProperty.other;
        }
  
      /**
      * Public method, assigned to prototype
      */
      Property.prototype.getPurchasePrice = function () {
          return this.purchasePrice;
      };
  
      return {
          createNew: function(newProperty) {
              console.log( "Alert accomplished" );
              return new Property(newProperty);
          }
      };
  });
  
  app.factory('portfolio', function(Property){
      var portfolio = {};
      portfolio.list = [];
  
      portfolio.add = function(newProperty){
          var prop = Property.createNew(newProperty);
          portfolio.list.push(prop);
          alert(prop.purchasePrice);
      };
  
      return portfolio;
  }); 
  
  app.controller('ListCtrl', function(portfolio) {
      var self = this;
      self.portfolio = portfolio.list;
  });
  
  app.controller('PostCtrl', function(portfolio){
      var self = this;
  
      self.addProperty = function(newProperty){
          portfolio.add(newProperty);
      }; 
  });
  
  &lt;/script&gt;
  
  &lt;ons-navigator&gt;
  &lt;ons-page&gt;
      &lt;div class="container" ng-controller="TopMenuController" ng-init="init('Initial investment','ion-social-usd')"&gt;
          &lt;div ng-include="url"&gt;&lt;/div&gt;
      &lt;/div&gt;
  
      &lt;div style="text-align: center"&gt;
          &lt;h2&gt;Initial investment&lt;/h2&gt;
  
          &lt;ul class="list"&gt;
                  &lt;input type="hidden" ng-model="newProperty.id" placeholder="id"&gt;
              &lt;li class="list__item"&gt;
                  &lt;input type="text" class="text-input text-input--transparent" style="width:100%; margin-top:4px;" ng-model="newProperty.pprice" placeholder="Purchase price"&gt;
              &lt;/li&gt;
              &lt;li class="list__item"&gt;
                  &lt;input type="text" class="text-input text-input--transparent" style="width:100%; margin-top:4px;" ng-model="newProperty.mv" placeholder="Market value"&gt;
              &lt;/li&gt;
              &lt;li class="list__item"&gt;
                  &lt;input type="text" class="text-input text-input--transparent" style="width:100%; margin-top:4px;" ng-model="newProperty.stamp" placeholder="Stamp duty"&gt;
              &lt;/li&gt;
              &lt;li class="list__item"&gt;
                  &lt;input type="text" class="text-input text-input--transparent" style="width:100%; margin-top:4px;" ng-model="newProperty.sourcing" placeholder="Sourcing fee"&gt;
              &lt;/li&gt;
              &lt;li class="list__item"&gt;
                  &lt;input type="text" class="text-input text-input--transparent" style="width:100%; margin-top:4px;" ng-model="newProperty.legal" placeholder="Legal fee"&gt;
              &lt;/li&gt;
              &lt;li class="list__item"&gt;
                  &lt;input type="text" class="text-input text-input--transparent" style="width:100%; margin-top:4px;" ng-model="newProperty.other" placeholder="Other"&gt;
              &lt;/li&gt;
          &lt;/ul&gt;
      &lt;/div&gt;
      &lt;br /&gt;
      &lt;div data-ng-controller="ListCtrl as list"&gt;
          &lt;p ng-repeat="prop in list.portfolio track by $index"&gt;
              New Object: {{prop.purchasePrice}}: {{prop.legaFee}} &lt;/p&gt;
      &lt;/div&gt;
  
      &lt;div ng-controller="PostCtrl as post"&gt;
          &lt;input type="button" ng-click="post.addProperty(newProperty)" value="Create Property"&gt;&lt;/input&gt;
          &lt;p&gt;{{newProperty}}&lt;/p&gt;
      &lt;/div&gt;
   &lt;/ons-page&gt;
  &lt;/ons-navigator&gt;
  </code></pre>
  
  <p>I don't understand what's wrong with this knowing that the exact same code is working when tested in a fiddle for example
  <a href="http://jsfiddle.net/XmWUP/129/" rel="nofollow">http://jsfiddle.net/XmWUP/129/</a></p>
  
  <p>Thank you for your help</p>