I am creating web app with TypeScript, AngularJS and Bootstrap.
For this purpose I use Visual Studio Project Template HTML Application With TypeScript.
Project structure is:
- app
- moduleA
- controllerFolder
- controller.ts
- view.html
- moduleA.ts
- controllerFolder
- moduleB
- moduleC
- app.ts
- moduleA
- scripts
- css
App folder contains many *.ts files hence I combine these files to single file my-app.js in Visual Studio with TypeScript Build > Combine Js output file to one.
And include this script file to index.html.
Of course if I run app it not work.
Module 'app' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.
I don’t use RequireJs, AMD, Browserify or another.
I don’t know if combine angular 'app' *.js files to the one is good practice.
So my questions are:
- What is good practice for this scenario?
- Can I bundle all 'app' *.ts / *.js files to single file?
- Can I create working single *.js file with Visual Studio without using RequireJs, AMD, Browserify.
- If I can’t create working single file with Visual Studio can I achieve this for example with Gulp?