How do you build your Angular application using Angular CLI for use on production environment?
Experience Level:
Junior
Tags:
Angular
Angular CLI
Answer
To build an Angular application for production environment, run the following command from the command line:
ng build --prod
By using the parameter --prod you are telling Angular CLI that it should do production optimizations. These take longer to process, but the resulting code will have smaller footprint and it will load faster as the files will be bundled and minified.
Related Angular CLI job interview questions
-
Why should I use Angular CLI?
Angular CLI Junior -
What command aliases do you use when using Angular CLI?
Angular Angular CLI Junior -
How do you build your Angular application using Angular CLI for use on a local or development environment?
Angular Angular CLI Junior -
Using Anular CLI, how do you create a new component that will be automatically imported to your feature module that is called feature-module1?
Angular Angular CLI Junior -
Using Anular CLI, how do you create a new component that will be automatically imported to your main app module?
Angular Angular CLI Junior