小编Ian*_*ary的帖子

模块不可用,拼写错误或忘记加载(但我没有)

我对角度相当新,并将其与JSON api文件一起使用.为了测试,我正在尝试使用免费的github api(我的函数名称是针对不同的json api,我将在稍后使用).我只是想看看我的功能是否正常console.log(),但我在控制台中收到此错误.

未捕获错误:[$ injector:modulerr]由于以下原因无法实例化模块MesaViewer:错误:[$ injector:nomod]模块'MesaViewer'不可用!您要么错误拼写了模块名称,要么忘记加载它.如果注册模块,请确保将依赖项指定为第二个参数.

MesaViewer在两者中拼写完全相同,并且在第二行中看到了依赖关系!

var app = angular.module("MesaViewer");
var MainController = function($scope, $location, $http, $routeParams) {
Run Code Online (Sandbox Code Playgroud)

我做错了什么?这是我的插件:http: //plnkr.co/edit/sZPaFbzbOB6AmVCLL1vq

javascript json module angularjs angularjs-injector

54
推荐指数
6
解决办法
12万
查看次数

标签 统计

angularjs ×1

angularjs-injector ×1

javascript ×1

json ×1

module ×1