Samsung Galaxy Fold

Create new angular 8 projects using angular CLI




Hi Everyone,
In this article, we will see how to create your first Angular project.

First step : setting up your environment :


in this step we will set up our environment which composed of : 
-nodeJs
-Angular CLI
-text editor

installing nodeJs:

You can download nodeJs from  https://nodejs.org/en/download.
to check if nodejs is correctly installed in your machine you can run node -v and make sure that the version is 8.x or 10.x 

installing Angular CLI:

 Angular CLI help to install all the angular packages you need for your project automatically so you don’t need to keep installing them manually one by one.

Let’s run: npm install -g @angular-cli 



if you want more information about Angular CLI you can visit https://cli.angular.io/

installing your text editor:

nowadays there are too many text editors developers are using. So it's up to you to choose your favorite text editor but personally, I use vscode and I truly recommend you to use it.

you can download vscode from https://code.visualstudio.com/download

Second step: Creating our first Angular Application :

1) create a file name is 'first_angular_app',
2) navigate in that file and run the command: ng new project-name
in my case, I've set the name of the project as angularcli


If you need routing in your application click ‘y’
Then set your stylesheet format which is generally ‘CSS’  so click enter and wait for a couple of minutes so the CLI finish creating the application and downloading the dependencies

Second step: Starting our first Angular Application :

it's time for us now to start our first application and see how it looks like
1) Navigate to the folder with your new application name
2) run the command ng serve  OR   ng serve -o       -o : open

once the compilation is done open your browser navigate to http://localhost:4200/ and you should see this



hope this was helpful 💓✌


 









Commentaires