Project Setup

#1 Create a new angular project

D:\BootcampProjects>ng new user-app

#2 Open the project in any editor like visual studio code

D:\BootcampProjects>cd user-app

D:\BootcampProjects\user-app>code .

#3 Understand the files generated,

Modules – Modules break up the application into logical pieces of code. Each piece of code or module is designed to perform a single task.All the modules are loaded by main.ts.

Component – Component is used to bring the modules together.

tsconfig.json – The presence of tsconfig.json file in a directory indicates that the directory is the root of a typescript project.This file specifies the root files and typescript compiler motions required to compile typescript.

package.json – It contains all the dependencies defined for the angular project.Once, we do nom install, these dependencies are automatically downloaded.

karma.conf.json – Config file for karma unit tests.

angular-cli.json –  Have all the application configurations such as info about the root and out directory.The welcome or main html file along with the main ts file. All the other environment related information will be present here.

#4 Run the application and view the output in the browser by hitting the following command in the Integrated terminal (open it by pressing ctrl+`) or in command prompt

D:\BootcampProjects\user-app>ng s

#5 Open the browser and hit the URL http://localhost:4200/

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s