In this article i'm gonna show you how to setup your development envirnoment and create your first angular project.
The first thing you need to install is the latest version of the node , if you have never worked with node before, it's basically a runtime envirnoment for executing javascript code outside the browser. Here in angular we are not going to work with node but node provides some tools that we need to build angular projects.
For installation of node just go to nodejs.org on this page you can see the latest version of node for your operating system here in my case the latest stable version is v8.9 and the latest version is v9.5 now this latest version has more features but its not stable yet so just go ahead and install the latest stable version v8.9 when you do that open up the terminal on mac or command prompt on windows (let me show you few commands)
and type
~ $node --version (on mac👈😉)
v8.9.4
so you can see on my machine i'm running node version 8.9 , the minimum version required for building angular applications is version 6.9. Once you have node then we are going to use a tool called NPM(Node Package Manager) to install third party libraries one of the library we have to install is
Angular CLI (command line interface) -it is command line tool that we are going to use to create new angular projects or generate some boilerplate code as well as create deployable packages.
So again go for command prompt in window's and run
>npm install -g @angular/cli
Here we have installed angular CLI package globally in our machine.
Note:- if you dont put -g here angular cli will be installed only in the current folder and it's not going to be accessible anywhere else, now if you are on mac😉 you need to put sudo at the beginning of this command to execute it as an administrator. here is
~$sudo npm install -g @angular/cli
Next we need to enter
Password:
This process will take some time to install.
Ok then now we installed angular CLI, now to ensure that the installation was successful type on command prompt
~$ng --version (mac)
>ng --version (windows)
You can see in your teminal running angular cli version 1.6.6 🤗 and below that you can see the version of node in your machine... so let's get started😍
The first thing you need to install is the latest version of the node , if you have never worked with node before, it's basically a runtime envirnoment for executing javascript code outside the browser. Here in angular we are not going to work with node but node provides some tools that we need to build angular projects.
For installation of node just go to nodejs.org on this page you can see the latest version of node for your operating system here in my case the latest stable version is v8.9 and the latest version is v9.5 now this latest version has more features but its not stable yet so just go ahead and install the latest stable version v8.9 when you do that open up the terminal on mac or command prompt on windows (let me show you few commands)
and type
~ $node --version (on mac👈😉)
v8.9.4
so you can see on my machine i'm running node version 8.9 , the minimum version required for building angular applications is version 6.9. Once you have node then we are going to use a tool called NPM(Node Package Manager) to install third party libraries one of the library we have to install is
Angular CLI (command line interface) -it is command line tool that we are going to use to create new angular projects or generate some boilerplate code as well as create deployable packages.
So again go for command prompt in window's and run
>npm install -g @angular/cli
Here we have installed angular CLI package globally in our machine.
Note:- if you dont put -g here angular cli will be installed only in the current folder and it's not going to be accessible anywhere else, now if you are on mac😉 you need to put sudo at the beginning of this command to execute it as an administrator. here is
~$sudo npm install -g @angular/cli
Next we need to enter
Password:
This process will take some time to install.
Ok then now we installed angular CLI, now to ensure that the installation was successful type on command prompt
~$ng --version (mac)
>ng --version (windows)
You can see in your teminal running angular cli version 1.6.6 🤗 and below that you can see the version of node in your machine... so let's get started😍
Comments
Post a Comment