Angular 2+

PAUL DAVIES
2 min readMay 24, 2019

--

Angular is a framework for building web applications.

Talking of 2+ I simply mean any version of angular from 2 and above. The structure of the versions before 2 is quite different and a little messy with me.

Angular 2+ works based on:

Components

Decorators

Metadata and dependency injection to make web programming nothing but the fun you always want in coding.

Snapshot of the structure of angular 2+

A component is basically like a container. Forgive me for using that but it is how I can simply describe it. It is a class that provides for normal programming. As a result, if you have knowledge in any OOP language then you are home already.

Angular uses typescript which was created and is being maintained by Microsoft.

A decorator is what binds the angular metadata to the class. As a result, it becomes very easy to do interpolation. Interpolation is simply the mapping of variables/objects in the class to the angular html template so that the values in them are visible to the user view.

The decorator contains metadata. The metadata includes: template, templateURl, selector, providers etc. We shall see what all the metadata does in angular.

So to make web programming simple and better, most of the views will be done as components.

From the snapshot shown above, you can easily view what I am talking about.

The template in the metadata region provides for a place to put your normal html code. Although you don’t always have to put it there because you can create it in a different file and call it in the template using the templateURL.

The selector helps the programmer place the component in some code where it is required. We shall see all this in the next article.

Guys, I don’t want to give you everything today because we just started the journey. We shall pick up in the next article on how to create an angular project. I hope you at least have a glance of what we shall be dealing with.

Note: A bee that stings at times give you the honey you love most of the time.

--

--

PAUL DAVIES
PAUL DAVIES

Written by PAUL DAVIES

Software Developer; Java, Angular2+,RxJS,Spring boot,Android

Responses (1)