Performance: Creating a new Angular project
This affects the initial page load speed and bundle size of the Angular app.
ng new my-app --standalone --skip-install=true
ng new my-app --routing --style=scss --strict=false --skip-install=false
| Pattern | DOM Operations | Reflows | Paint Cost | Verdict |
|---|---|---|---|---|
| Default Angular new project with routing and SCSS | Moderate DOM nodes | Multiple reflows during initial render | High paint cost due to styles and components | [X] Bad |
| Minimal Angular new project without routing or extra styles | Minimal DOM nodes | Single reflow on initial render | Lower paint cost with fewer styles | [OK] Good |
my-app with default settings?ng new followed by the project name to create a new project.ng new my-app. Other options are invalid CLI commands.--routing to enable routing and --style=scss to set SCSS styles.ng new test-app --routing --style=css and then cd test-app followed by ng serve, what will happen?ng serve compiles and launches a local server at port 4200 by default, showing the app in the browser.ng new my-app --routing --style=less but get an error saying the style option is invalid. What is the likely cause?shop-app with routing enabled, SCSS styles, and skip installing npm packages initially. Which command should you use?--skip-install to skip installing npm packages after project creation.--routing enables routing, and --style=scss sets SCSS styles correctly.Pass the test and this pattern moves unknown