⚒️ 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
ngcommands (other thannew) must be run in the directory where you created the Angular applications (technically, in the directory with theangular.jsonfile, 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.htmland inspect the contents. - Delete the content of the
templateproperty 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
titleproperty of the component class, save your file, and view the changes. - Modify the value of the
titleproperty in the component class, save and view the changes.