I am new in this field and reading about one project code. Here are two file.
In the first file:
When you define your module in angular, you have to define an array as second parameter with the list of modules your module depend on (or an empty array if is not depending on anything).
When you use your module in angular, you skip this second parameter.
These are the two cases in your code.
You could put everything in same file, but it is considered a general good practice to keep individual files for different controllers/services/directives (or even the definition of the module).