Meaning of the empty array in angularJS module declaration

前端 未结 3 1366
眼角桃花
眼角桃花 2021-02-08 19:28

In my previous question, I understand that the code var app = angular.module(\'myApp\', []); connects the module app to the view myApp.

3条回答
  •  忘了有多久
    2021-02-08 19:49

    Angulars API says Passing one argument retrieves an existing angular.Module, whereas passing more than one argument creates a new angular.Module https://docs.angularjs.org/api/ng/function/angular.module

提交回复
热议问题