When using the Angular CLI, which option ensures the application is built for production?

  • ng serve
  • ng build
  • ng test
  • ng lint
When building an Angular application for production, you should use the "ng build" command with the "--prod" flag. This flag enables optimizations like Ahead-of-Time (AOT) compilation, minification, and tree shaking to create a smaller and more efficient production bundle.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *