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

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -