I'm currently migrating an application from Angular 1.x to Angular 2.0 and I have two issues related to the module system and the way js file are loaded:
In the Angular 1.x version, I had a grunt job that was watching at my files and that combined all js files in a huge one. At the end, I just referenced it in my index page and everything worked. With Angular 2.0, I'm using TypeScript and the module approach, so loading the js files is handled by the module system. Therefore, I don't have one big file, instead, I can see a lot of calls in the Network tab of my Google Chrome Developper Dashboard to all JS files. I tried to combine the files and include the resulting one but I had some errors related to anonymous module registration. So I'm wondering if there is a way to combine all the JS files in one.
In the Angular 1.x version, I had a specific folder called "language" that contained a "fr" and a "en" folder. My grunt job was creating two different files: "product.fr.min.js" and "product.en.min.js". They were composed by all the JS files + "language/fr/.js" for the ".fr.min.js" file and by all the JS files + "language/en/.js" file for the ".en.min.js". As, with Angular 2.0 & TypeScript, I don't really have the control on what file is loaded when, I don't really know how to migrate that part and I'd like to avoid having both "fr" and "en" files referenced (because I could add other language and I don't want that the user have to load 36 languages just to use one).
Thanks