I was trying to learn Angular 4. When referencing the angular tutorial, I was able to run the application but when running the "npm start", the system creates the build files in the same src folder. Here I'm trying to get the JS files created in a separate folder called build, like "src/app/build" and run it off there. Could someone please help on this query? Thanks in Advance. https://angular.io/tutorial/toh-pt6
1
votes
2 Answers
1
votes
0
votes
It is your IDE
creating that mess due to it is Auto Transpiring the .ts
in to .js
. You have to disable that.
If you using JetBrains IDE
you have to make sure that Enable TypeScript compiler
is disabled in Preferences > Languages & Frameworks > TypeScript
.
In case of Atom
you need to set compileOnSave: false
in tsconfig.json
VScode
is not auto transpiling .ts
files unless you have watcher/task runner
manually setup yourself
But usually we are using angular cli for any angular project
npm install -g @angular/cli
ng new my-proj
cd my-proj
ng serve