Angular: step up and Set up your Environment
Lets get started with the angular development environment setup.
Note: I have npm (3.8.6 version), node (6.0.0 version) installed on my machine. Install npm on your machine
I have downloaded the sample application from the official angular site:
Setup
Downloaded and unzipped the app in the setup folder.
Run npm install from command promt.
You can ignore the warning, your final project structure will look like this:
Now run npm start from command promt.
Note: I have npm (3.8.6 version), node (6.0.0 version) installed on my machine. Install npm on your machine
I have downloaded the sample application from the official angular site:
Setup
Downloaded and unzipped the app in the setup folder.
Run npm install from command promt.
You can ignore the warning, your final project structure will look like this:
Now run npm start from command promt.
Let us check the importance of each file in this project:
Filename | Description |
---|---|
package.json | It contains the metadata for the npm project. This helps npm to identify the project as well as provide the project dependencies. |
src/app/app.component.ts | Defines the AppComponent along with an HTML template, CSS stylesheet, and a unit test. It is the root component of what will become a tree of nested components as the application evolves. |
src/app/app.module.ts | Defines AppModule, the root module that tells Angular how to assemble the application. Right now it declares only the AppComponent. Soon there will be more components to declare. |
src/index.html | The main HTML page that is served when someone visits your site. Most of the time you'll never need to edit it. |
src/main.ts | The main entry point for your app. Compiles the application with the JIT compiler and bootstraps the application's root module (AppModule) to run in the browser. |
src/styles.css | Your global styles go here. Most of the time you'll want to have local styles in your components for easier maintenance, but styles that affect all of your app need to be in a central place. |
src/tsconfig.json | TypeScript compiler configuration for the Angular app |
Useful link: Angular Index
Comments