Thursday, 17 April 2025

Angular 19 | Chapter 1 | Building Your First Angular Application

 

  1. Download and Install latest Node JS version. ( I used v23.11.0 )
     
  2. Run command in cmd
      node -v

 

  1. Run command in cmd
      npm -v

 

  1. Install Angular globally on DEVBOX by running ccommand in cmd

npm install -g @angular/cli

 

 

  1. Run command in cmd to get Angular version installed
      ng version

 

  1. Create a new folder for your 1st angular add example: E:\AngularApps
    change directory to
      cd E:\AngularApps
     
  2. Create 1st angular app by this command:

ng new MyFirstAngApp
 

Selected CSS

Selected NO for SSR & SSG

 

  1. Change directory to your autogenerated Angular code
      cd E:\AngularApps\MyFirstAngApp
     
  2. Run command
      ng serve
    your app gets hosted at http://localhost.4200

Note: You can also host the same web application on free web hosting sites.

Here is my link to my 1st angular application that can be easily hosted on your laptop or desktop machine and run locally in your web browser.

To try building the sample application on your local machine, after extracting the .zip file.
open command prompt. Navigate to the folder you extracted. and run following command.

npm install 

This will download all the packages that are saved in "package.json",  it will reinstall all of the dependencies in the same .zip extracted folder. After that just run "npm serve" to run the application.

Interesting task to tryout: once you have locally built the angular application, check the Netlify website.
Netlify provides you option to host angular application for free. With 300 build minutes.
That would easily be sufficient for 1 full year . To understand how to host your own angular web application for free check my next blog post.





No comments:

Post a Comment