Building an Angular Application
Explore how to build an Angular application using the Angular CLI. Understand the build process including compiling TypeScript and CSS, managing output files, and using different configurations for development and production modes. Learn how these steps optimize app performance and prepare your app for deployment.
We'll cover the following...
To build an Angular application, we use the following command of the Angular CLI (for a local machine):
ng build
The build process boots up the Angular compiler, which primarily collects all TypeScript and HTML files of our application code and converts them into JavaScript. CSS stylesheet files such as SCSS are converted into pure CSS files. The build process ensures the fast and optimal rendering of our application in the browser.
An Angular application contains various TypeScript files not generally used during runtime, such as unit tests and tooling helpers. How does the compiler know which files to collect for the build process? It reads the files property of the ...