This array is designed to add various modules to your current app , which is mentioned in your first part of angular.module as a string`, you could just say to inject various dependencies.
You can create the n module inside your application for each angular component, and then you can combine them into one application, and you can angular.bootstrap or apply it on the page using the ng-app directive.
Example
Suppose you have an application that has different components, such as services, factory, filters, directives, etc. You can create a module for each of them. Just to share attention.
angular.module('myApp.filters', []) angular.module('myApp.services', []) angular.module('myApp.controllers', []) angular.module('myApp.directives', []) angular.module('myApp.constants', [])
And adding a component to it, you can just use this particular module. As you wanted to add a service, you simply add this service to myApp.services , doing
angular.module('myApp.services').service('example', function(){ })
And then inside you app.js you can combine all these modules with one module, as shown below.
angular.module('myApp', [ 'myApp.services', 'myApp.controllers', 'myApp.directives', 'myApp.directives', 'myApp.constants' ])
During application initialization, you can simply use myApp inside, which will make all other modules available to it.
What is the empty array used for?
In the code, you create a module that does not introduce any dependency, [] , which means that it does not depend on any other angular module.
The dependency entered inside [] is nothing more than importing a module