AngularJS Flashcards
Ahead-of-time (AOT) compilation
You can compile Angular applications at build time. By compiling your application using the compiler-cli, ngc, you can bootstrap directly to a module factory, meaning you don’t need to include the Angular compiler in your JavaScript bundle. Ahead-of-time compiled applications also benefit from decreased load time and increased performance.
Annotation
In practice, a synonym for Decoration.
Attribute directives
A category of directive that can listen to and modify the behavior of other HTML elements, attributes, properties, and components. They are usually represented as HTML attributes, hence the name.
For example, you can use the ngClass directive to add and remove CSS class names.
Barrel
A way to roll up exports from several ES2015 modules into a single convenient ES2015 module. The barrel itself is an ES2015 module file that re-exports selected exports of other ES2015 modules.
Binding
Usually refers to data binding and the act of binding an HTML object property to a data object property.
Sometimes refers to a dependency-injection binding between a “token”—also referred to as a “key”—and a dependency provider.
Bootstrap
You launch an Angular application by “bootstrapping” it using the application root NgModule (AppModule).
Bootstrapping identifies an application’s top level “root” component, which is the first component that is loaded for the application. For more information, see the Setup page.
You can bootstrap multiple apps in the same index.html, each app with its own top-level root.
camelCase
The practice of writing compound words or phrases such that each word or abbreviation begins with a capital letter except the first letter, which is lowercase.
Function, property, and method names are typically spelled in camelCase.
Component
An Angular class responsible for exposing data to a view and handling most of the view’s display and user-interaction logic.
The component is one of the most important building blocks in the Angular system. It is, in fact, an Angular directive with a companion template.
dash-case
The practice of writing compound words or phrases such that each word is separated by a dash or hyphen (-). This form is also known as kebab-case.
Directive selectors (like my-app) and the root of filenames (such as hero-list.component.ts) are often spelled in dash-case.
Data binding
Applications display data values to a user and respond to user actions (such as clicks, touches, and keystrokes).
In data binding, you declare the relationship between an HTML widget and data source and let the framework handle the details. Data binding is an alternative to manually pushing application data values into HTML, attaching event listeners, pulling changed values from the screen, and updating application data values.
Decorator | decoration
A function that adds metadata to a class, its members (properties, methods) and function arguments.
Decorators are an experimental (stage 2), JavaScript language feature. TypeScript adds support for decorators.
To apply a decorator, position it immediately above or to the left of the item it decorates.
Dependency injection
A design pattern and mechanism for creating and delivering parts of an application to other parts of an application that request them.
Angular developers prefer to build applications by defining many simple parts that each do one thing well and then wiring them together at runtime.
These parts often rely on other parts. An Angular component part might rely on a service part to get data or perform a calculation. When part “A” relies on another part “B,” you say that “A” depends on “B” and that “B” is a dependency of “A.”
Directive
An Angular class responsible for creating, reshaping, and interacting with HTML elements in the browser DOM. The directive is Angular’s most fundamental feature.
A directive is usually associated with an HTML element or attribute. This element or attribute is often referred to as the directive itself.
ECMAScript
The latest approved version of JavaScript is ECMAScript 2017 (also known as “ES2017” or “ES8”). Many Angular developers write their applications in ES8 or a dialect that strives to be compatible with it, such as TypeScript.
Injector
An object in the Angular dependency-injection system that can find a named dependency in its cache or create a dependency with a registered provider.
Input
A directive property that can be the target of a property binding (explained in detail in the Template Syntax page). Data values flow into this property from the data source identified in the template expression to the right of the equal sign.