⚒️ Modifying the App Component
We will do some quick modifications of the app.component.ts
.
- Make sure your application is being served by running
ng serve -o
- Note: All the the
ng
commands (other thannew
) must be run in the directory where you created the Angular applications (technically, in the directory with theangular.json
file, or a subdirectory of that.)
- Note: All the the
- Your browser should be displaying the default content of the app component when you navigate to
http://localhost:4200
. - Open
src/app/app.component.html
and inspect the contents. - Delete the content of the
template
property in the Component metadata (leaving the backticks). - Save the file and notice the compiler (
ng serve
) detects the change and recompiles and refreshed your browser. You will see an empty page. - Add some HTML content to the template property, save the file, and notice the change.
- Use a binding expression to show the content of the
title
property of the component class, save your file, and view the changes. - Modify the value of the
title
property in the component class, save and view the changes.