Module is not available, misspelled or forgot to load (but I didn't)

后端 未结 9 2096
伪装坚强ぢ
伪装坚强ぢ 2020-12-13 12:17

I am fairly new to angular and using it with JSON api files. TO test, I am trying to use the free github api (my names for functions are for a different json api that i will

相关标签:
9条回答
  • 2020-12-13 12:50

    I have the same problem, but I resolved adding jquery.min.js before angular.min.js.

    0 讨论(0)
  • 2020-12-13 12:53

    I had the same error and fixed it. It turned out to be a silly reason.

    This was the culprit: <script src="app.js"/>

    Fix: <script src="app.js"></script>

    Make sure your script tag is ended properly!

    0 讨论(0)
  • 2020-12-13 12:59

    I got this error when my service declaration was inside a non-invoked function (IIFE). The last line below did NOT have the extra () to run and define the service.

    (function() {
        "use strict";
    
        angular.module("reviewService", [])
            .service("reviewService", reviewService);
    
        function reviewService($http, $q, $log) {
            //
        }
    }());
    
    0 讨论(0)
提交回复
热议问题