What is Angular? Angular tutorial 1

What is Angular? Angular tutorial 1

Angular is a JavaScript framework which allows you to create reactive, single page applications.

Why angular?

Everyone has used mobile and web applications be it from social media to health care e-commerce and net banking these apps are used by billions of people across the globe now the main reason we use these apps is that they offer seamless user experience and interface but how are they developed to provide such reliability in one of the frameworks that is widely used to build such robust apps is angular.

Today JAVASCRIPT is the most commonly used client-side scripting language it is written into html documents enabling interactions with web pages in many unique ways so as a relatively easy to learn language with almost pervasive support it is exceptionally well suited to develop modern applications but the question arises is JAVASCRIPT ideal for developing single page applications(SPAs) that require modularity testability and other features perhaps NOT, however we have a variety of frameworks and libraries designed to help us with such things with respect to front-end development angular and JAVASCRIPT together bring in structure and consistency to your web applications and also provide scalability and maintainability.

Angular is specifically developed for single page applications (SPAs) so now the question arises what exactly is angular angular is an open source JavaScript framework written completely in typescript now it was primarily aimed to develop single page applications and is maintained by google angular as a framework provides a few advantages while also providing a standard structure for developers it is designed for web desktop and mobile platforms.

What are SPA’s ?

Many websites when you would visit nowdays and click somewhere in the page, then you may have noticed that the whole page doesn’t load itself, only the required componenets would load and the rest remains the same.

So we can say that,

A single-page application (SPA) is a web application that interacts with the user by dynamically rewriting the current web page with new data from the web server, instead of the default method of a web browser loading entire new pages. The goal is faster transitions that make the website feel more like a native app.

In a SPA, a page refresh never occurs; instead, all necessary HTML, JavaScript, and CSS code is either retrieved by the browser with a single page load,[1] or the appropriate resources are dynamically loaded and added to the page as necessary, usually in response to user actions.


We only have one single HTML element which doesn’t seem to be a built-in one (a native one), but that’s Angular doing its job.

SPA gives the user a very reactive user experience (UX).

JavaScript is much faster than having to reach out to a server for every page change and for every new piece of data you want to display.

Therefore, this approach allows you to create web applications which look and feel almost like mobile applications; very fast!

Everything happens instantly just  within few seconds.

If you do need some data from a server, you simply load it in the background so that the user never leaves this experience of having a reactive web application to use.

So every click you do simply changes one single page that we’re using.

So, how is this done?

Well, JavaScript changes the DOM, changes whatever is displayed (in the browser), by changing the HTML code during runtime

(so to say).

Another way to say the above thing is SINGLE PAGE APPICATIONS (SPAs) are basically applications that get loaded just once so the main page gets loaded onto your browser so any further interactions does not lead to loading of subsequent pages anything that has to be done further is just an addition to the already loaded page so these single page applications are primarily developed using angular.

What makes Angular good for web apps?

Here I will discuss 4 points which is the reason why angular is considered good for development.

document object model
type script
data binding
and
testing