Error: [ng:areq] from angular controller

后端 未结 20 2173
攒了一身酷
攒了一身酷 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:24

    I ran into this issue when I had defined the module in the Angular controller but neglected to set the app name in my HTML file. For example:

    
    

    instead of the correct:

    
    

    when I had defined something like:

    angular.module('myApp', []).controller(...
    

    and referenced it in my HTML file.

提交回复
热议问题