title: AngularJS Controller Declaration -- Error: $controller:ctrlreg
body: <p>I have a basic controller in angularJs named "BasicController".
  Below is my code (BasicController.js):</p>
  
  <pre><code>(function () {
         var app = angular.module("app", []);
         app.controller("BasicController", function ($scope) {
         alert(2);
         $scope.menus = ["Profile", "About", "Contact"];
      });
  }());
  </code></pre>
  
  <p>But when I run this project below error showing. What actually error says I can't understand. Please someone explain that is the problem actually.</p>
  
  <p><a href="https://i.stack.imgur.com/T4Qno.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/T4Qno.png" alt="enter image description here"></a></p>