Error: [ng:areq] from angular controller

后端 未结 20 1974
攒了一身酷
攒了一身酷 2020-11-27 17:39

This is a long shot, but has anyone seen this error before? I am trying to add \'Transporters\' using express, angular and mongoDB. I get this error whenever I access a page

相关标签:
20条回答
  • 2020-11-27 18:35

    Check the name of your angular module...what is the name of your module in your app.js?

    In your TransportersController, you have:

    angular.module('mean.transporters')
    

    and in your TransportersService you have:

    angular.module('transporterService', [])
    

    You probably want to reference the same module in each:

    angular.module('myApp')
    
    0 讨论(0)
  • 2020-11-27 18:35

    The error will be seen when your controller could not be found in the application. You need to make sure that you are correct using values in ng-app and ng-controller directives

    0 讨论(0)
提交回复
热议问题