What is Angular?
What is Angular?
Angular is a front-end framework based on the concepts of components. It takes the old way of how we used to build websites and enhances it by adding new features and advantages to building single-page applications.
Why Angular?
Consider this example:
We have a simple app to view user information and the post he has made. There is a user profile section that displays their photo, name, and bio. Underneath the profile section, is a list of posts that the user has posted.
Our code may look something like this:
There is a lot of code. And even worst, if we want to display more posts or add more information about the user, we will have to add more code or even repeat some of the existing code to make that happen. It gets harder and harder to maintain.
We took the code from the profile and posts section and then separated them into 2 modules. Then, we included it in our application with a simple syntax.
AngularJS vs Angular
The last thing I want to mention is the difference between Angular and AngularJS. Angular is developed by Google in 2010 and that is version 1. Ver sion 1 of Angular is called AngularJS and Angular is versions 2 and above.
What makes an application single-paged?
In the past, websites operated differently. It worked like this. There is a browser and a web server. When you enter the web address you want to go to on the browser, it will send a request to the web server and ask for a web page. Then, when the web server received the request, it will send a page back. This process is repeated every time you go to a different page on the site.