Angular CLI
2.3 Angular CLI
Section titled “2.3 Angular CLI”Simple Words First 🟡
Section titled “Simple Words First 🟡”The Angular CLI (Command Line Interface) is like a magic wand. Instead of manually creating 15 files to make one component, you type one command and it does everything for you.
Installation
Section titled “Installation”# Install Angular CLI globally (do this once on your machine)npm install -g @angular/cli
# Verify installationng versionMost Used CLI Commands
Section titled “Most Used CLI Commands”# Create a new projectng new my-app
# Start the development server (with live reload)ng serve
# Generate a new componentng generate component user-list# Shorthand:ng g c user-list
# Generate a serviceng g s user
# Generate a moduleng g m users
# Build for productionng build --configuration production
# Run testsng test
# Get helpng help