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

后端 未结 9 2229
伪装坚强ぢ
伪装坚强ぢ 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:40

    It should be

    var app = angular.module("MesaViewer", []);
    

    This is the syntax you need to define a module and you need the array to show it has no dependencies.

    You use the

    angular.module("MesaViewer");
    

    syntax when you are referencing a module you've already defined.

提交回复
热议问题