by Sai gowtham

Angular cli commands list

In this tutorial, we will learn about some basic commands which are commonly used in Angular cli.

ng new

This command is used to create a new angular project.

ng new myapp

ng generate

This command is used to generate new components, routing modules, services, and guards.

Create new components

ng generate component myfirst-component

#where myfirst-component is your component name

This above command can also be written as

ng g c myfirst-component

# g means generate
# c means component

Create new services

ng g s  my-service

#s means service

This above command will create new services in your app, by default services are injected into root level.

Create route guards

ng generate guard auth-guard

#where auth-guard is your guard name

Once you run this above command you will see three available guards and you need to choose which guard is required for you.

? Which interfaces would you like to implement?
(Press <space> to select, <a> to toggle all, <i> to invert selection)
❯◯ CanActivate
 ◯ CanActivateChild
 ◯ CanLoad

Create custom directives

ng generate directive emoji

This command will create a new custom directive called emoji in your app folder.

ng serve

This command is used to start the local development server so that you can develop your favorite app on your pc.

ng serve

ng test

This command is used to run the unit tests in a project.

ng test

ng e2e

This command is used to run the end to end tests in a project.

ng e2e

ng build

This command is used to build your app for production use.

ng build

Css Tutorials & Demos

How rotate an image continuously in CSS

In this demo, we are going to learn about how to rotate an image continuously using the css animations.

How to create a Instagram login Page

In this demo, i will show you how to create a instagram login page using html and css.

How to create a pulse animation in CSS

In this demo, i will show you how to create a pulse animation using css.

Creating a snowfall animation using css and JavaScript

In this demo, i will show you how to create a snow fall animation using css and JavaScript.

Top Udemy Courses

JavaScript - The Complete Guide 2022 (Beginner + Advanced)
JavaScript - The Complete Guide 2022 (Beginner + Advanced)
116,648 students enrolled
52 hours of video content
$14.99 FROM UDEMY
React - The Complete Guide (incl Hooks, React Router, Redux)
React - The Complete Guide (incl Hooks, React Router, Redux)
631,582 students enrolled
49 hours of video content
$24.99 FROM UDEMY
Vue - The Complete Guide (w/ Router, Vuex, Composition API)
Vue - The Complete Guide (w/ Router, Vuex, Composition API)
203,937 students enrolled
31.5 hours of video content
$14.99 FROM UDEMY