Sunday, 3 November 2019

What are the benefits of Angular?


Performance  From a performance standpoint, Angular has faster initial loads, change detection, and improved rendering time. Not just performance, we also have improved modularity, Dependency injection and testability.

Mobile Support  Angular is designed from the ground up with mobile support. Mobile device features and limitations like touch interfaces, limited screen real estate, and mobile hardware have all been considered in Angular. So, with Angular we can build a single application that works across mobile and desktop devices.

Component Based Development  Component based web development is the future of web development. In Angular, "everything is a component". Components are the building blocks of an Angular application. The advantage of the component-based approach is that, it facilitates greater code reuse. From unit testing standpoint, the use of components makes Angular more testable.

1.      What are prere uisites for building a new angular application?
Stable version of Node, npm (node package manager), CLI (Command Line Interface)


A component in Angular is a class with a template and a decorator. So, in simple   terms a component in Angular is composed of these 3 things

Template - Defines the user interface. Contains the HTML, directives and bindings.

Class - Contains the code re uired for template. Just like a class in any object-oriented programming language like C# or Java, a class in angular can contain methods and properties. Properties contain the data that we want to display in the view template and methods contain the logic for the view. We use TypeScript to create the class.

Decorator - We use the Component decorator provided by Angular to add metadata to the class. A class becomes an Angular component, when it is decorated with the Component decorator.



No comments:

Post a Comment