Skip to main content

Getting Started with Angular: A Beginner's Guide

Published 2 min readMarkdown

What is Angular?

Angular is front-end Framework developed by Google. its is based of JavaScript/TypeScript . I prefer TypeScript for more secure compared to JS.

Installation Guide.

  • we need latest node.js to use angular in our machine

    • Install node.js from https://nodejs.org/en/download (LTS version).

    • After installing Node.js , open cmd and check if node is installed by typing

        node --version
      
  • After installing node.js , we need to install angular cli by typing this command in CMD

      npm install @angular/cli
    
  • check id angular cli is installed by typing this command in cmd

      ng --version
    

First Angular Project .

In CMD type the following commands one by one

//ng new projectname
ng new Hello-world
code .

If you need zoneless project then Y else N. => zoneless project is nothing but project without zone.js.

Zoneless" in Angular refers to a new paradigm for managing change detection without relying on zone.js

Choose the Style sheet you need to use. CSS/SCSS/LESS.

After completing the project should look like

  1. app.ts → Main file where we mostly work

  2. app.css → style

  3. app.html → html file which holds the app.ts

  4. app.route.ts→ file the contains links to another file like ( contact , about , skills ,etc.).

  5. index.html → main file for our website

  6. styles.css → Style sheet for our website

  7. main.ts → holds the components of the website

  8. package.json → contains all the dependencies and scripts to run the project

To Run the project

ng serve

in Browser visit http://localhost:4200/ to see the project.

to Stop the project click CTRL+c in the same terminal.

No comments yet. Be the first to comment.