| npm install -g @angular/cli | To install the Angular CLI into our local machine using npm, run this command. |
| ng version | Displays the information about the currently installed CLI. |
| ng new <application name> | Using the ng new command, a new Angular application will be created. |
| ng new <application name> --prefix best | New project is created, and the project prefix is set to new. |
| ng new --help | All available Angular commands are returned by this command. |
| ng lint my-app | Linting warnings are checked against this command in our entire application. |
| ng lint my-app --fix | This command will correct any form of linting errors. |
| ng lint my-app --format stylish | Our entire codebase is formatted using this command. |
| ng lint my-app --help | The list of linting commands is returned by this command. |
| ng add <package name> | To use this command, you must first enable your package manager. Then, this command will use your package manager to download new dependencies and update your project with configuration changes. |
| ng generate component <name> | A new component of our application will be created as a result of this command. |
| ng g s <service name> | Creates a new class-based service based on Javascript classes. |
| ng g cl <destination> | This command creates a new class in the specified directory. |
| ng build | An application is created and stored in the dist directory using this command. |
| ng serve | The local development server is launched, and the app is served locally in the browser. Port and open are both specified. When you change any of the source files, the app is rebuilt and reloaded, and the page is changed automatically. |
| ng serve -o | This command opens up the application in a browser using any port 4200 or any available port |
| ng serve -ssl | This command enables the application to be accessed using SSL. |
| ng generate | To produce elements, services, components, classes, providers, pipes, and other types of modules. |
| ng g c MyComponent -d | This dry runs the code and helps in cleaning the command line clean. |
| ng g c MyComponent --export | This exports the component |
| ng g c MyComponent -f | This is used to overwrite the existing components. It forces rewriting. |
| ng g c --help | List of options for a given command is displayed using this. |