As we all know that Angular 2 is much popular among the js frameworks nowadays. So today I am going to start the angular2 demo here at jsonworld.
So lets start today angular2 from the very basic app.
At first we need node.js and npm installed in our system to proceed. Then we need to install angular command line module. For that we need to run following command over terminal.
After completing installation from above we can check if it installed properly or not.
The angular command line is officially tool provided by Google Angular2 team to create, manage the Angular project. It follows the best standard and code practices recommended by the Angular team.
So now move to the next step, Installation of TypeScript. So still typescript is not installed in the system then run the below command to install TypeScript.
We can check its status with below command.
It will return the version of the TypeScript.
So in the next step, for creating new app in angular2 using cli, we need to run below command that will create basic setup for angular2 applicaiton
The above command will create a new folder name provided above in the command. This command will run npm install at background to install node.js related dependencies. To run the above app create go inside the newly created folder with cd jsonworld-test-app/ and run the below command.
Now our aim is fulfilled, angular2 basic app is created. Now we can check the basic app by typing http://localhost:4200
Finally Its works fine.
For reading the detailed document on the angular cli and basic stucture, visit the official site of angular.
In the next demo we will learn to create a static website on angular2
Getting started with Angular2 is really easy using Angular command line interface.
You can download complete code from here. Download Code