title: Angularjs Argument is not a function got string
body: <p>I am a newbie to angularjs.  I am building an application where my home page will have a list of posts.  I thought of using angularjs for two way binding for that page alone.  I started with a sample page but ran into issues here itself.</p>
  
  <p>My sample page.  I am using ng-app for this div alone as i dont want angularjs to interact with any other aspects of the page.</p>
  
  <pre><code>&lt;div ng-app="posts"&gt;
    &lt;ul class="post_list" ng-controller="PostController"&gt;
      &lt;li ng-repeat="post in posts"&gt;
      {{post.title}}
      {{post.description}}
      &lt;/li&gt;
    &lt;/ul&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>i have a app.js file which has</p>
  
  <pre><code>var app = angular.module('posts', []);
  </code></pre>
  
  <p>and a postcontroller.js file with</p>
  
  <pre><code>(function(angular, app) {
    // Define the Controller as the constructor function.
    console.log(app);
    console.log(angular);
    app.controller("PostController",["$scope"], function($scope) {
      $scope.posts = [
        {"title":"asdf", "description":"describe"},
        {"title":"second one", "description":"second describe"},
      ];
    });
  })(angular, app);
  </code></pre>
  
  <p>When i load my home page. I am getting </p>
  
  <blockquote>
    <p>Error: argument "PostController" is not a function. got string 
    [googlecdn path]angular.min.js:16</p>
  </blockquote>
  
  <p>What am i missing here.  Please help me as i am totally confused.  I am new to angularjs and also to javascript.</p>