Recall & Review
beginner
What command do you use to start a development server for an Angular app?
You use
ng serve to start a development server that watches your files and reloads the app automatically when you make changes.Click to reveal answer
beginner
What is the default port Angular uses when you run
ng serve?The default port is 4200. You can access your app in the browser at
http://localhost:4200.Click to reveal answer
intermediate
How can you change the port when running
ng serve?Add the
--port option like this: ng serve --port 4300. This will start the server on port 4300 instead of 4200.Click to reveal answer
intermediate
What does the
ng serve command do behind the scenes?It compiles your Angular app, starts a local web server, watches your files for changes, and reloads the app in the browser automatically.
Click to reveal answer
beginner
How do you stop the Angular development server once it is running?
Press Ctrl + C in the terminal where
ng serve is running. This stops the server.Click to reveal answer
Which command starts the Angular development server?
✗ Incorrect
ng serve starts the development server with live reload.What URL do you open in your browser to see the app after running
ng serve with default settings?✗ Incorrect
The default port is 4200, so the URL is
http://localhost:4200.How do you change the port when running the Angular server?
✗ Incorrect
The correct syntax includes
ng serve --port 4300, ng serve -p 4300, or ng serve --port=4300. All are valid ways to specify the port.What happens if you change your code while
ng serve is running?✗ Incorrect
ng serve watches files and reloads the app automatically on changes.How do you stop the Angular development server?
✗ Incorrect
Pressing Ctrl + C in the terminal stops the running server.
Explain the steps and command to run and serve an Angular app locally for development.
Think about how you start, view, and stop the app during development.
You got /5 concepts.
Describe how you can customize the Angular development server when running it.
Focus on command options and server behavior.
You got /4 concepts.