Angular 2 and it's Core features

in #programming7 years ago (edited)

Angular 2 is the latest Javascript open source client-side framework. It is very popular and useful framework available today to build powerful web applications. It is created and maintained by Google. Before going to next, I want to clear some question about Angular 2 such as why we use Angular 2? What’s new from Angular 1? What Angular 2 offers? What are the core features of Angular 2? And what are the prerequisites for Angular 2?

Why we use Angular 2?

  • It is easier than Angular 1 just because of its fewer concept.
  • It supports the latest version of browsers and old as well.
  • It can speed up your application.
  • It is a cross-platform
  • It supports dependency
  • Angular 2 code structure is more simplified than the previous version of Angular.
  • Angular 2 is mainly focused on mobile applications.

What’s New from Angular 1?

  • It has no more controllers.
  • It has no more Scope.
  • It has better mobile support.
  • It has Components.
  • It is used with TypeScript.

What Angular 2 offers?

  • It offers Form and Input handling.
  • It offers Event Handling.
  • It offers Routing.
  • It offers latest JavaScript standards.
  • It offers HTTP Services.
  • It offers Components.
  • It offers fast rendering.
  • It offers Dynamic HTML.

What are the main features of Angular 2?

There are some following main features of Angular 2.

  • Component: Component is the basic building block of the UI. It is a controller class with a template. It is the main way which we build and specify elements and logic on the page. E.g.
@Component({
    selector: ‘my-component’,
    template: ‘<div>Hello my name is {{name}}. <button (click)=”MyName()”>My Name</button></div>’
})
  • Templates: Componenet’s view can be defiened by templates. Templates tells the angular how to display the component. E.g. <div> My Name is : {{name}}</div>

  • Services: Services are the responsible for doing a specific task only. They are used for reusable data services to share between components throughout the application.

  • Directives: Directives are used to change the behavior of an element on the base of user input or the data that is coming from services. There are three kinds of directives such as Component Directives, Structural Directives, and the last one is Attribute directives.

  • Dependency Injection: Dependency injection is a design pattern that passes an object as dependencies in different components across the application.

What are the prerequisites for Angular 2?

You should have some basics knowledge of HTML, Basic JavaScript, TypeScript, Angularjs 1 (Not very important), and the basics programming fundamentals such as Functions, Loops, and conditionals etc.

Coin Marketplace

STEEM 0.18
TRX 0.16
JST 0.030
BTC 68394.30
ETH 2644.71
USDT 1.00
SBD 2.69