Day 1 : Angular - Into the background


Why do we use Angular?

Angular is a framework that we usually use for creating SPA (Single Page Applications). The application rewrites the whole content on the page which comes from the web server instead of reloading the entire web page.

Example:- For instance, consider this as a web page with 3 components.

Let's just make the explanation easy. In the older days, a web page used to be divided into multiple parts and there were an equally large number of HTML files. As the number of HTML files was high, the source code of the website seemed a little confusing to developers as well as hard to maintain. If you want to refresh some parts of the web page, that was not directly possible. That was because to refresh certain parts, we would need to refresh the entire page. For example, concerning the above image, if I needed to refresh only one part, I needed to refresh the entire page. However, in a few years, AJAX - Asynchronous JavaScript and XML solved this problem.

However even if it seemed AJAX had solved the problem, still there were a large number of HTML files which would be a very hectic job for a developer. To fix this thing, the concept of Single Page Application or SPA came into the picture.

Single Page Application

A Single Page Application is a concept where we present a single page to the user on the web. Even if the page would contain numerous components, the user will not even get a feel for the change in contents on that page.

Angular is the framework that will aid us in building Single Page Applications. You can visit its official site:- Angular Official Site