Angular: Angular is a platform and framework for building mobile and desktop web applications. Using HTML and TypeScript in Angular, you can build single-page client applications. Though it compiles JavaScript, it helps spot and eliminates common mistakes when typing the code.
Angular is the best platform for developing robust applications. It is free and open-source software. Furthermore, it has clear advantages while also providing a standard structure to work it.
In this article, we have stated the Cheat Sheet for Angular. Use these commands to save your working time.
Last Updated on Mar 21, 2022.
Installation Commands:
In the following table, we have listed installation commands and their functions in Angular. Please use these commands carefully.
Command | Function |
---|---|
NodeJS, npm, AngularCLI, IDE | This command is used for pre-requirement. |
ng update @angular/cli @angular/core | Use this command to update the app. |
node -v && npm -v && ng version | Make use of this command for version check. |
Project Setup Commands:
In the following table, we have listed commands and their functions for Project setup. Kindly use these commands properly.
Command | Function |
---|---|
ng new my-app | If you want to create an app, you can use this command. |
cd my-app | It is used to make the project set up for the app folder. |
ng serve | In order to run the app, you can use this command. |
ng serve –host 0.0.0.0 –port 4205 | This command is used to run the app custom. |
Structure/App Commands:
The following table explains the structure of app commands and their functions in Angular. Please use these commands wisely.
Command | Function |
---|---|
app.module.ts | In order to explain the usage of the libraries, you can use this command. |
app.component.html | By using this command, you can get HTML code for the app is in this file. |
app.component.spec.ts | It is used to make unit tests for the source component. |
app.component.ts | This command is used to make the class component. |
app-routing.module.ts | Make use of this command to deal with the routing. |
Src/Structure commands:
The following explains the src or structure commands and their functions of the Angular.
Commands | Function |
---|---|
app/ | Used for the application folder that stores the components of the application. |
assets/ | If you want to make images or js files, you can use this command. |
environment/ | By using this command, you can check the details of the final file. |
index.html | It is defined as the file which is displayed in the browser. |
main.ts | Make use of this command to import the basic modules and setup. |
polyfills.ts | This command is used for backward compatibility. |
test.ts | If you want to make the unit tests for the cases for the testing. |
styles.css | Use this command to make the style file required for the object. |
favicon.ico | In order to use the site icon file, you can use this command. |
tsconfig.spec.json | It will help to maintain the details for the texting. |
typings.d.ts | With the help of this command, you can manage the typescript definition. |
Verdict:
You can use these commands for Windows 10 and Windows 11. Make sure to use these commands carefully to save your working time.
From this article, you get to know about the Cheat Sheet for Angular. I hope this article is helpful. If you have any questions or doubts regarding this article, feel free to ask us in the comment section.