Hello Everyone,
In this tutorial, I'm going to show you how ton set up an Angular environnement in Linux by installing NodeJS, Angular CLI and then create your first application.
to do that, we need to update our package manager
As I'm running on ubuntu, the command to install nodejs is the following : sudo apt-get install nodejs
To verify that nodeJs in installed, we can verify the version of it by typing the following command : sudo apt-get install npm
The next step is to install the node package manager, which will let us to install the required modules needed by our project.
The command to install npm is the following :
npm apt-get install npm
The next step is to install two NodeJs modules (TypeScript and Angular @CLI.) using NPM.
The commands are :
sudo npm install -g typescript
sudo npm install -g @angular/cli@1.0.0
With those packages installed, we can verify that the Angular CLI is working properly by submitting the following command :
ng --version
to create our HelloWorld application, we can type the following:
ng new --ng6 --name hello-world
Congratulation, you've just created your first Angular application, to run it we need to enter in the created directory for our application 'hello-world' and then submit the following command :
Now that our application is running, we can access it using curl:
In this tutorial, I'm going to show you how ton set up an Angular environnement in Linux by installing NodeJS, Angular CLI and then create your first application.
to do that, we need to update our package manager
As I'm running on ubuntu, the command to install nodejs is the following : sudo apt-get install nodejs
To verify that nodeJs in installed, we can verify the version of it by typing the following command : sudo apt-get install npm
The next step is to install the node package manager, which will let us to install the required modules needed by our project.
The command to install npm is the following :
npm apt-get install npm
The next step is to install two NodeJs modules (TypeScript and Angular @CLI.) using NPM.
The commands are :
sudo npm install -g typescript
sudo npm install -g @angular/cli@1.0.0
With those packages installed, we can verify that the Angular CLI is working properly by submitting the following command :
ng --version
to create our HelloWorld application, we can type the following:
ng new --ng6 --name hello-world
Congratulation, you've just created your first Angular application, to run it we need to enter in the created directory for our application 'hello-world' and then submit the following command :
Now that our application is running, we can access it using curl: