Can you explain the distinction between these two methods of loading modules?
angular.module('CoreApp', ['...','...','...','...']); //parent module
angular.module('MainApp1', ['CoreApp']); //child 1
angular.module('MainApp2', ['CoreApp']); //child 2
angular.module('CoreApp', ['...','...','...','...','MainApp1','MainApp2']); //parent module
angular.module('MainApp1', []); //child 1
angular.module('MainApp2', []); //child 2
Other than that, it seems like there might be a better approach. I have separate mainApps running on different domains (mainapp1.com and mainapp2.com). I want to avoid duplicating headers, footers, and services like translate across each module. How can I achieve this efficiently without compromising development ease?
I'm considering creating a private Bower package with CoreApp to be used in other projects. Do you have any suggestions for a more effective solution?
Thank you.