Angular is a TypeScript based open-source web application framework used in building both web and mobile based applications. In this article, we will go through some of the angular features by explaining some of its core API. You can follAngular is a TypeScript based open-source web application framework used in building both web and mobile based applications. In this article, we will go through some of the angular features by explaining some of its core API. You can follow this angular cheat sheet to build your project. We have tried to cover Angular CLI, Angular Lifecycle Hooks, Angular Routing and much more here.

Angular CLI

Angular gives us the ability to do a whole lot using their CLI. You can config the entire application by just using the CLI. Here are some of the commands:

  • npm install -g @angular/cli : This command will install the Angular CLI into our local machine using npm.
  • ng new <application name> : This will setup a new Angular application using the ng new command.
  • ng new <application name> --prefix best : This create a new project and set the projects prefix to new.
  • ng new --help: This returns all available Angular command list.
  • ng lint my-app: This command checks our entire application for any linting warnings.
  • ng lint my-app --fix: If there are any form of linting errors, this command will fix it.
  • ng lint my-app --format stylish : This formats our entire codebase.
  • ng lint my-app --help: This command returns all the available linting command list.
  • ng add <package name>: This command will use your package manager to download new dependencies and update the project with configuration changes.
  • ng generate component <name>: This will create a new component on our application. We can also use the ng g c <name> shorthand to do this.
  • ng g d <directive name>: This command angular directive.
  • ng g s <service name> : Creates a new Javascript class based service.
  • ng g p <pipe name>: Generates a new pipe
  • ng g cl <destination> : This will create a new class in the specified directory.
  • ng build: Builds the application for production and stores it in the distdirectory.
  • ng serve -o: Serves the application by opening up the application in a browser using any port 4200 or any available port.
  • ng serve -ssl: serves the application using ssl

ow this angular cheat sheet to build your project. We have tried to cover Angular CLI, Angular Lifecycle Hooks, Angular Routing and much more here.

Angular CLI

Angular gives us the ability to do a whole lot using their CLI. You can config the entire application by just using the CLI. Here are some of the commands:

  • npm install -g @angular/cli : This command will install the Angular CLI into our local machine using npm.
  • ng new <application name> : This will setup a new Angular application using the ng new command.
  • ng new <application name> --prefix best : This create a new project and set the projects prefix to new.
  • ng new --help: This returns all available Angular command list.
  • ng lint my-app: This command checks our entire application for any linting warnings.
  • ng lint my-app --fix: If there are any form of linting errors, this command will fix it.
  • ng lint my-app --format stylish : This formats our entire codebase.
  • ng lint my-app --help: This command returns all the available linting command list.
  • ng add <package name>: This command will use your package manager to download new dependencies and update the project with configuration changes.
  • ng generate component <name>: This will create a new component on our application. We can also use the ng g c <name> shorthand to do this.
  • ng g d <directive name>: This command angular directive.
  • ng g s <service name> : Creates a new Javascript class based service.
  • ng g p <pipe name>: Generates a new pipe
  • ng g cl <destination> : This will create a new class in the specified directory.
  • ng build: Builds the application for production and stores it in the distdirectory.
  • ng serve -o: Serves the application by opening up the application in a browser using any port 4200 or any available port.
  • ng serve -ssl: serves the application using ssl

#cheatsheet #web-development #typescript #productivity #angular

Essential Angular 9 Development Cheat Sheet
33.20 GEEK