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.
Loading...
Related Quiz
- You are building an e-commerce application. On the product page, you want to have tabs for "Details", "Reviews", and "Related Products", each being a separate route. How would you structure this in Angular?
- What is the role of Value Accessors in Angular forms?
- What happens if two services provided in different modules depend on each other?
- For optimizing performance in large lists where data is immutable, one should use the ChangeDetectionStrategy.______ strategy.
- What is the purpose of the ControlValueAccessor interface in Angular forms?