Let’s start with building our first Angular 2 application using Typescript. First, make sure you have Node.js and npm installed in your system. You can refer to the official website https://nodejs.org/en/ for more information about the installation procedure of Node.js.
Usage:
Step 1: Make a directory on your project folder.
example: mkdir angular2 via command prompt.
Step 2: Open cmd on this folder using shift+right click (open command window here) or open terminal if using linux & mac.
Step 3: Clone or fork this repository, here is the angular seed https://github.com/angular/angular2-seed.gittype git clone on your command prompt (wait for few seconds)for example: git clone https://github.com/angular/angular2-seed.git
Step 4: Angular2-seed folder is cloned on you project folder.
Step 5: Now, type cd angular2-seed (go to inside this folder)for example cd angular2-seed
Step 6: Run npm install to install dependencies, and wait for few minutes run npm start to fire up dev serve
Step 7: Make sure you have NPM installed version 3+
Step 8: WINDOWS ONLY run npm install -g webpack webpack-dev- server typescript to install global dependencies
Step 9: Make sure you have node.js installed version 5+
Step 10: In your browser go to http://localhost:3000
if you want to use other port, open package.json file, then change port in -- port 3000 script.
Now, the basic structure of angular 2 is complete. You can modify, add, delete, update the file as per your project requirement. Stay tuned and in the next article, I will be explaining how to go further with building a development environment with Webpack and more.
Thanks!
How to set up the basic environment of Angular2 with angular-seed
February 2, 2017
1 min read