javascript - Module is not available, misspelled or forgot to load (but I didn't) -
i new angular , using json api files. test, trying use free github api (my names functions different json api working later). wanted see if functions working console.log()
, receive error in console.
uncaught error: [$injector:modulerr] failed instantiate module mesaviewer due to: error: [$injector:nomod] module 'mesaviewer' not available! either misspelled module name or forgot load it. if registering module ensure specify dependencies second argument.
i have spelled mesaviewer
exact same in both, , dependencies seen in second line!
var app = angular.module("mesaviewer"); var maincontroller = function($scope, $location, $http, $routeparams) {
what did wrong? here plunk: http://plnkr.co/edit/szpafbzbob6amvcll1vq
it should
var app = angular.module("mesaviewer", []);
this syntax need define module , need array show has no dependencies.
you use
angular.module("mesaviewer");
syntax when referencing module you've defined.
Comments
Post a Comment