In the previous article I covered how to create a new project with Angular CLI and start a very simple Angular web application. We did not write a single line of code and did not modify anything. In this article we will start modifying our very minimal Angular application and make an application of our own.
In Angular applications we rarely talk about the index.html file. We create it and we forget about it. Let’s see what content we have in our existing index.html file.
There is no link to JavaScript or CSS files present in the file. Even, no link to any Angular JavaScript/Typescript files exists. We do not need to include them. Our Angular CLI has set up everything for us so that after building the application, Webpack automatically includes everything for us inside the index.html file. As a result at this beginning stage you do not need to worry about how that is being done. We will explore internals in some future articles when you have moved to a more advanced stage in learning Angular.
There is also a style.css in the root src directory of your Angular project. This is the root stylesheet for your angular application. We will also use component specific CSS files in our applications.
The most important part of index.html is inside body. app-root is the placeholder for our application. This…