Angular Framework : The Introduction for  beginners

What is Angular?

Angular is a  TypeScript-based programming platform.

A framework for developing scalable SPA web applications based on components.

What is SPA?

SPA  Means Single-page application.

A SPA loads only a single web page once, after that change the  content of that page 

The fundamentals of angular framework

* Components * Templates * Dependency injection * Directives

Angular Components

Components are the basic building blocks to build an application.  A TypeScript class with   * @Component() decorator, * an HTML template  * styles  are combined to make a component.

Component decorator


– A CSS selector that defines how the component is used in a template.

– An HTML template that instructs  Angular how to render the component.

– An optional set of CSS styles that define the appearance of the template's HTML elements.

Angular  Templates

Every component has an HTML template that declares how that component renders. We can define the template either inline or by path of file.

Dependency injection

Dependency injection allows you to declare the dependencies of your TypeScript classes without taking care of their instantiation. Instead, Angular handles the instantiation for you.

Directive - Angular

it's a Decorator which marks a class as an Angular directive to add custom behavior to elements in the DOM.

Types of Directive 

* Built-in directives * Attribute directives * Structural directives