Loading topic
ng command, that creates, builds, tests and maintains Angular applications. This chapter covers what the CLI does, how it is installed, and how to confirm and fix the installation. The next chapter uses it to create a workspace.5 min readng new, the command that creates an Angular workspace. It assumes you know basic TypeScript, HTML and CSS, and that Node.js and npm are installed. It also assumes you are comfortable in a terminal. It looks at what the command asks you, what it produces, and which errors tend t5 min readng new my-app and can open the resulting folder in an editor. You should know what npm does and be able to read JSON. The goal is to learn what each file at the top of the workspace is for, which ones you edit by hand, and which ones you leave alone.5 min readng new and can open the generated workspace. You should know basic TypeScript, HTML, and how a component pairs a class with a template. The src folder holds everything the build compiles into your application. Files outside it, such as angular.json and `packag4 min readng new, can read basic TypeScript, and know what a component and a decorator are. It covers the path from the browser loading your page to the first component rendering. It focuses on src/main.ts and src/app/app.config.ts.4 min readng new and ng serve once. It covers the root component that main.ts bootstraps, and the standalone model that Angular uses to declare what a component depends on.4 min readsrc/app/app.routes.ts, the file that maps URLs to components. It assumes you have read the bootstrapping chapter, so you know that app.config.ts registers the router with provideRouter(routes). It also assumes you know TypeScript arrow functions and basic standalone compone5 min readangular.json is the workspace configuration file. It tells the CLI which projects exist, which tasks each project supports, and which options each task uses. This chapter assumes you have created a workspace with ng new and know what main.ts and tsconfig.json do.4 min readng new, you know what src/app and angular.json contain, and you can read basic TypeScript decorators. It covers how ng generate works, which artifacts it produces, which options matter, and which mistakes beginners make most often.4 min readng new, can read the basic structure of angular.json, and know that the build target names a builder and holds options. You will learn what ng serve and ng build do, where their output goes, and which problems come up most often.5 min readangular.json at the level of the previous chapters. You should know that a project has architect targets such as build and serve, and each target names a builder and a set of options. Here you will see how one build target produces different outputs for deve4 min readng new. It also assumes you have seen angular.json and the tsconfig files. Here you will learn what ng test does, how the files it uses connect, and how to fix 4 min readng commands, read package.json, and know what a semantic version range such as ^19.0.0 means. You should also have a workspace created with ng new, as covered earlier in this tutorial.5 min readng new, you know what ng generate produces, and you have read the route configuration file (app.routes.ts). It covers how to arrange folders once the application has more than a handful of components. You will see the common layouts, how the5 min readangular.json, run ng generate and ng build, and know what a standalone component is. Earlier chapters covered those. Here you will see how one workspace can hold several applications and libraries, how they find each other, and where this setup tends to break.5 min readangular.json, run ng generate and ng build, and know what an npm package is. It explains the two extension mechanisms behind those commands. A schematic changes your source files. A builder runs a task such as building or testing.5 min read