It just comes to my mind that most AngularJS (*.js) file I have seen so far only contains one module, and the name of the module is not always the same to the file name.
I would like to know, whether it works by putting multiple modules inside one AngularJS (*.js) file.
Also, how does the server find the correct module name when web page makes a function call? By searching every file in the directory in a brute-forced way?
You can put as many modules as you want in a file (not necessarily best practice though). Angular knows which module to load because you register each module with Angular.
angular.module('myModule', [])
That way it doesn't have to look for modules based on convention.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With