title: Failing to Display Array using Angular ng-repeat
body: <p>I am playing around with angularjs and I am attempting to build a menu tree. In my current example my ng-repeat is not working and {{folder.name}} does not display the array of folders, which is instantiated so there is at least one folder object in the array. Any ideas?</p>
  
  <p>Here is a link to the plunker with the output: <a href="http://plnkr.co/edit/j7J9ibpqgt65jdGSsPWu" rel="nofollow">http://plnkr.co/edit/j7J9ibpqgt65jdGSsPWu</a> </p>
  
  <p>My angular code: </p>
  
  <pre><code>var treeApp = angular.module("treeApp", [])
  .controller("treeController", ["$scope", function($scope) {
  
  var defaultName = "Node";
  
  //Node object
  function Folder() {
      var name = defaultName;
  }
  
  //Node array
  $scope.menu = [
      this.folder1 = new Folder()
  ];
  
  //Adds node to array
  $scope.add = function() {
      var newFolder = new folder();
      $scope.menu.push(newFolder);
  };
  
  //Removes last node in array
  $scope.remove = function() {
      $scope.menu.pop();
  };
  
  }])
  </code></pre>
  
  <p>My html: </p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html lang="en" ng-app="treeApp"&gt;
  &lt;head&gt;
  &lt;meta charset="UTF-8" /&gt;
  &lt;link rel="stylesheet" href="style.css" /&gt;
  &lt;/head&gt;
  
  &lt;body ng-controller="treeController"&gt;
  
  &lt;div&gt;
    Name of Nodes: &lt;input type="text" ng-model="defaultName" placeholder="Data"&gt;
  &lt;/div&gt;
  
  &lt;div class="Tree Display"&gt;
    &lt;hr/&gt;
    &lt;h2&gt;&lt;strong&gt;The Tree:&lt;/strong&gt;&lt;/h2&gt;
  
    &lt;button ng-click="menu.add()"&gt;Add&lt;/button&gt;
    &lt;br/&gt;
    &lt;button ng-click="menu.remove()"&gt;Remove&lt;/button&gt;
  
    &lt;ul&gt;
      &lt;li ng-repeat="folders in menu"&gt;
        {{folder.name}}
      &lt;/li&gt;
    &lt;/ul&gt;
  &lt;/div&gt;
  
  &lt;script type="text/javascript" src="angular.min.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="ngTree.js"&gt;&lt;/script&gt;
  
  &lt;/body&gt;
  
  &lt;/html&gt;
  </code></pre>