From d6d780c016a8734c98b543620e04c1e26b60b91e Mon Sep 17 00:00:00 2001 From: ivuorinen Date: Tue, 10 Feb 2026 00:33:00 +0000 Subject: [PATCH] Update cheatsheets --- tldr/ng | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/tldr/ng b/tldr/ng index 2b3cbc18..5874debe 100644 --- a/tldr/ng +++ b/tldr/ng @@ -6,36 +6,36 @@ source: https://github.com/tldr-pages/tldr.git # ng > Create and manage Angular applications. -> More information: . +> More information: . - Create a new Angular application inside a directory: -`ng new {{project_name}}` +`ng {{[n|new]}} {{project_name}}` -- Add a new component to one's application: +- Compile the application and start a local development server: -`ng generate component {{component_name}}` +`ng {{[s|serve]}}` -- Add a new class to one's application: +- Create a new component: -`ng generate class {{class_name}}` +`ng {{[g|generate]}} {{[c|component]}} {{component_name}}` -- Add a new directive to one's application: +- Build an Angular application or library: -`ng generate directive {{directive_name}}` - -- Run the application with the following command in its root directory: - -`ng serve` - -- Build the application: - -`ng build` +`ng {{[b|build]}}` - Run unit tests: -`ng test` +`ng {{[t|test]}}` + +- Add a package to the current project: + +`ng add {{package}}` + +- Update workspace dependencies: + +`ng update` - Display version: -`ng version` +`ng {{[v|version]}}`