Angular 显示问题 ... 不正确

Angular showing issue ... not getting proper

我是 angular JS 的新手。请看一下。这是我的 app.js 文件

angular.module("CrudDemoApp",["CrudDemoApp.controllers","ngRoute"]);

这是我的 controllers.js 文件

angular.module("CrudDemoApp.controllers", []);
controllers("MainController", function ($scope)
{
    $scope.message = "Main Controller";  
});

这是我的 body 部分

<body ng-app="CrudDemoApp">
<div ng-controller="MainController">
{{message}}
</div>
</body>

首先它说“未捕获的引用错误:未定义控制器 那时它在说 错误:[ng:areq] http://errors.angularjs.org/1.5.6/ng/areq?p0=MainController&p1=not%20a%20function%2C%20got%20undefined

angular.module("CrudDemoApp.controllers", []) //remove semicolon here adding the controller to this module
  .controller("MainController", function ($scope) // dot before controller, remove "s"
  {
      $scope.message = "Main Controller";  
  });

注意控制器上的圆点和复数的缺乏

在你提到的错误之前,你应该已经看到了一些其他错误总是从第一个开始工作,有时 1 个错误会导致下一个。