title: AngularJS controllers created with "new" or not
body: <p>I've been seeing conflicting information on whether a custom controller is instantiated with a "new" keyword or simply applied to the $scope object.</p>
  
  <p>The documentation site says,</p>
  
  <blockquote>
    <p>Angular applies (in the sense of JavaScript's Function#apply) the controller constructor function to a new Angular scope object, which sets up an initial scope state. This means that Angular never creates instances of the controller type (by invoking the new operator on the controller constructor). Constructors are always applied to an existing scope object.</p>
  </blockquote>
  
  <p>But it seems like in Angular 1.2, there is an <code>"as"</code> construct that will rename a controller to something else as in:</p>
  
  <pre><code>&lt;body ng-controller="DemoController as demo"&gt;
      &lt;tr ng-repeat="student in demo.students"&gt;
          &lt;td&gt;{{student.name}}&lt;/td&gt;
      &lt;/tr&gt;
  &lt;/body&gt;
  
  function DemoController() {
      this.students = [...]
  }
  </code></pre>
  
  <p>So this makes it seem like a controller is being instantiated using the <code>new</code> keyword.</p>
  
  <p>Which one is it? Can someone clarify this?</p>