Running First Component
Let's try building our first angular component. To Create a Component in Angular type the following command below in Command Prompt.
ng new MyFirstComponent
After MyFirstComponent
is successfully executed a new directory will be created with the name MyFirstComponent
. This directory contains basic starup codes and one component in MyFirstComponent\src\app
directory.
Let's run the application.
In Command prompt enter:
cd MyFirstComponent
then
ng serve --port 8000
Now open your browser and goto to url http://localhost:8000
and check your application running.