Basic installation and running angular program /project


Basic installation and to just run a fresh project

Angular development environment needs node.js and npm package manager,  To run the angular application we don’t need node.js and npm. but npm depends on node.js and npm help us to write commands, to manage dependencies and get our development work done easily. So we are going to use the same.

1. Download the setup file of node.js from https://nodejs.org/en/ and install the same
Install node.js

2. Now we are ready with npm environment and with the help of npm, install angular
Go to command prompt and run following command
npm install –g @angular/cli



We are ready with Angular CLI

3. Let’s create your workspace and project to start your real work
To do so run following command
ng new yourAppaName

before creating a project it will ask for “routing” – say yes because mostly we create multiple components and to go from one page to another page we need a router, So say yes for routing
and also it will ask for styling type usually we use CSS so select CSS for styling purpose.
once we run above command and follow few steps mentioned above, it will create new project.


4. we can edit code in any editor but here I am going to use visual studio code (https://code.visualstudio.com/download)

now go to visual studio code
click on file -> open folder
and give the path of our created project it will open our project in vs code,
now press (Ctrl + ‘ )
you will get access to a command prompt inside visual studio code with help of the above shortcut.
to run our newly created application run the following command
ng serve




Or if you don’t want to use visual studio code.
4. then go to your newly created project directory using command prompt and run following command
ng serve





and if you want to open your application in the browser automatically, then add –open or –o in serve command
ng serve --open



We will see what are the components and how to create components and create simple project which will contain multiple pages

Comments

  1. I must thank you for providing such a valuable content for us. This is one amazing piece of article. Helped a lot in increasing my knowledge
    Node JS Online training
    Node JS training in Hyderabad

    ReplyDelete
  2. Save your time and get the best software built by the experts by simply a hiring Angular development company in USA.

    ReplyDelete
  3. I feel very grateful that I read this. It is very helpful and very informative and I really learned a lot from it.
    app and you are doing well.




    Dot Net Training in Chennai | Dot Net Training in anna nagar | Dot Net Training in omr | Dot Net Training in porur | Dot Net Training in tambaram | Dot Net Training in velachery

    ReplyDelete

Post a Comment