Introduction Flashcards
What is Angular?
Unlike AngularJS (JS noting JavaScript), Angular is a ‘TypeScript-based’ front-end web application platform. It is a completely rewritten version of AngularJS that provides a professional platform for web application development across all platforms.
What is the main difference between Angular and AngularJS?
Angular uses TypeScript and has components as its main building blocks. It is ‘component-based’, whereas AngularJS uses ‘directives’.
Angular uses a hierarchy of components, whereas AngularJS uses directives that permit code reusability. AngularJS also uses controllers and scopes.
Angular provides standard directives, however it implements them differently than AngularJS.
What role to Angular components play?
Angular components play a significant role in creating user interfaces where every UI portion is defined as a component.
What are the differences between directives in Angular and AngularJS?
Angular includes standard directives whereas AngularJS provides a pack of them.
Both Angular and AngularJS use directives, however they use them differently.
For instance, one can use the ng-model to create a two-way binding in AngularJS. The ng-bind directive is suitable for one-way binding.
Angular has only the ngModel.
In Angular, how do you specify the type of binding you want using symbols?
To specify one-way binding we use: “ []”
To specify two-way binding we use: “ [()]”
”[]” is for property binding and “()” is for event binding.
Why use Angular?
Provides a mobile support framework.
Supports TypeScript that enables code optimization and modularity using the ‘OOPS’ concept.
Supports changes for an increased hierarchical dependencies system.
A developer can use various features such as syntax for type checking, Dart, TypeScript, ES5, ES6, iterators, Angular CLI, and lambda operators.
Angular opts for semantic versioning that has a major-minor-patch arrangement.
Amongst its best benefits is its provision for the event of ‘simplest routing’.
What are Angular components?
Angular components are directives with a ‘template’.
What are the two kinds of directives in Angular?
Structural directives that alter the layout of the DOM by removing and replacing its elements.
Attributive directives that change the behavior or appearance of a DOM element.
What is TypeScript?
A language developed by Microsoft that is a superset of JavaScript.
What are the benefits of TypeScript?
Type declarations
Benefits of ES6
Iterators
Lambdas
What is 2-way data binding?
A way to automatically synchronize data between the Model and View. Any change made in the Model is immediately reflected in the View as well, and vice-versa.
Two-way data binding in Angular is used to display information to the end user and allows the end user to make changes to the underlying data using the UI. This makes a two-way connection between the view (the template) and the component class.
Explain dependency injection via Angular
Angular implements unidirectional tree-based change detection and uses the Hierarchical Dependency Injection system. This significantly boosts performance for the framework.
What architectural model is Angular based on?
Component Oriented Architecture
What does Component Oriented Architecture (COA) help do?
It makes structuring and organizing large amounts of code easier by creating separation between UI, UI Logic, Presentation Logic, and Application Logic.
What is the over purpose of Angular?
It’s a client-side framework for creating Single Page Applications (SPAs).