You are on page 1of 3

HVPM COET SUB: CSLAB-III

PRACTICAL NO.03
Aim :- Creating first Application in Angular .

Theory :- To create an initial Application , navigate to the folder theory: To create an


initial application, navigate to the folder where you want to create an application, and
execute the ng new <project name> command in the terminal/command window.
The following creates a new angular application named "FirstAngularApp" in the
AngularApps folder.

D:\AngularApps> ng new FirstAngularApp

The ng new command prompts you for information about features to include in the
initial app project. You can accept the defaults by pressing an Enter key, as shown
below.
The above command may take 2-3 minutes to create a project and install necessary
libraries. To open this project in VS Code, navigate to the project folder in the

SUBMITTED BY: KRUTIKA WANKHADE ROLL NO.: 19


HVPM COET SUB: CSLAB-III

terminal/command window and type code.


D:\Angular Apps\FirstAngularApp\code
Run Angular Application
Use angular CLI command ng serve -o to built an application. The -o indicates to open it
automatically in the default browser.
Open the terminal in VS Code from menu Terminal -> New Terminal, and type ng serve -o
command and press enter, as shown below.

The ng serve command builds the app, starts the development server, watches the source
files,
and rebuilds the app as you make changes to those files. It will open your Angular application
in the default browser, as shown below
The ng serve command keep watching source files, so if you make any changes in any file of
the project, it will rebuild it and refresh the browser automatically to reflect the changes. To
stop the automatic build process, press Ctrl+c in the terminal of VS Code.

SUBMITTED BY: KRUTIKA WANKHADE ROLL NO.: 19


HVPM COET SUB: CSLAB-III

Result: Thus we have studied creation of Application in Angular.

SUBMITTED BY: KRUTIKA WANKHADE ROLL NO.: 19

You might also like