Angular has a vocabulary of its own. Most Angular terms are everyday English words with a specific meaning within the Angular system.
This glossary lists the most prominent terms and a few less familiar ones that have unusual or unexpected definitions.
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
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
Ahead-of-time compiled applications also benefit from decreased load time and increased performance.
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.
A good example of an attribute directive is the
ngClass directive for adding and removing CSS class names.
Almost always refers to Data Binding and the act of binding an HTML object property to a data object property.
You launch an Angular application by "bootstrapping" it using the application root Angular module (
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 with its own top level root.
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. Examples include:
getHeroes. Notice that
square is an example of how you write a single word in camelCase.
This form is also known as lower camel case, to distinguish it from upper camel case, which is PascalCase. When you see "camelCase" in this documentation it always means lower camel case.
An Angular class responsible for exposing data to a view and handling most of the view’s display and user-interaction logic.
You apply the
Component decorator to
the component class, thereby attaching to the class the essential component metadata
that Angular needs to create a component instance and render it with its template
as a view.
Those familiar with "MVC" and "MVVM" patterns will recognize the component in the role of "controller" or "view model".
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
the root of filenames (such as
hero-list.component.ts) are often
spelled in dash-case.
Applications display data values to a user and respond to user actions (clicks, touches, keystrokes).
Instead of manually pushing application data values into HTML, attaching event listeners, pulling changed values from the screen, and updating application data values, you can use data binding by declaring the relationship between an HTML widget and data source and let the framework handle the details.
Angular has a rich data binding framework with a variety of data binding operations and supporting declaration syntax.
Read about the forms of binding in the Template Syntax page:
Dependency injection is both a design pattern and a 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".
You can ask a "dependency injection system" to create "A" for us and handle all the dependencies. If "A" needs "B" and "B" needs "C", the system resolves that chain of dependencies and returns a fully prepared instance of "A".
Angular provides and relies upon its own sophisticated dependency injection system to assemble and run applications by "injecting" application parts into other application parts where and when needed.
At the core there is an
injector that returns dependency values on request.
injector.get(token) returns the value associated with the given token.
A token is an Angular type (
OpaqueToken). You rarely deal with tokens directly; most
methods accept a class name (
Foo) or a string ("foo") and Angular converts it
to a token. When you write
injector.get(Foo), the injector returns
the value associated with the token for the
Foo class, typically an instance of
During many of its operations, Angular makes similar requests internally, such as when it creates a
component for display.
Injector maintains an internal map of tokens to dependency values.
Injector can't find a value for a given token, it creates
a new value using a
Provider for that token.
A provider is a recipe for creating new instances of a dependency value associated with a particular token.
An injector can only create a value for a given token if it has
provider for that token in its internal provider registry.
Registering providers is a critical preparatory step.
Angular registers some of its own providers with every injector. We can register our own providers.
Read more in the Dependency Injection page.
An Angular class responsible for creating, reshaping, and interacting with HTML elements in the browser DOM. Directives are Angular's most fundamental feature.
A Directive is almost always associated with an HTML element or attribute. We often refer to such an element or attribute as the directive itself. When Angular finds a directive in an HTML template, it creates the matching directive class instance and gives the instance control over that portion of the browser DOM.
You can invent custom HTML markup (for example,
associate with your custom directives. You add this custom markup to HTML templates
as if you were writing native HTML. In this way, directives become extensions of
Directives fall into one of three categories:
Components that combine application logic with an HTML template to render application [views]. Components are usually represented as HTML elements. They are the building blocks of an Angular application and the developer can expect to write a lot of them.
Attribute directives 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.
Structural directives, a directive responsible for shaping or reshaping HTML layout, typically by adding, removing, or manipulating elements and their children.
Angular developers may choose to write in ES5 directly.
Short hand for ECMAScript 2015.
Short hand for ECMAScript 2015.
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.
A form of property data binding in which a template expression between double-curly braces renders as text. That text may be concatenated with neighboring text before it is assigned to an element property or displayed between element tags, as in this example.
Just-in-time (JIT) compilation
With Angular just-in-time bootstrapping you compile your components and modules in the browser and launch the application dynamically. This is a good choice during development. Consider using the ahead-of-time mode for production apps.
You can tap into key moments in that lifecycle by implementing one or more of the lifecycle hook interfaces.
Each interface has a single hook method whose name is the interface name prefixed with
For example, the
OnInit interface has a hook method named
Angular calls these hook methods in the following order:
ngOnChanges- when an input/output binding value changes.
ngOnInit- after the first
ngDoCheck- developer's custom change detection.
ngAfterContentInit- after component content initialized.
ngAfterContentChecked- after every check of component content.
ngAfterViewInit- after component's view(s) are initialized.
ngAfterViewChecked- after every check of a component's view(s).
ngOnDestroy- just before the directive is destroyed.
Read more in the Lifecycle Hooks page.
In Angular, there are two types of modules:
Angular apps are modular.
In general, you assemble your application from many modules, both the ones you write and the ones you acquire from others.
A typical module is a cohesive block of code dedicated to a single purpose.
A module exports something of value in that code, typically one thing such as a class. A module that needs that thing, imports it.
The structure of Angular modules and the import/export syntax is based on the ES2015 module standard.
An application that adheres to this standard requires a module loader to load modules on request, and resolve inter-module dependencies. Angular does not ship with a module loader and does not have a preference for any particular 3rd party library (although most examples use SystemJS). You may pick any module library that conforms to the standard.
Modules are typically named after the file in which the exported thing is defined.
The Angular DatePipe
class belongs to a feature module named
date_pipe in the file
You rarely access Angular feature modules directly. You usually import them from one of the Angular scoped packages such as
A directive property that can be the target of event binding. Events stream out of this property to the receiver identified in the template expression to the right of the equal sign.
The practice of writing individual words, compound words, or phrases such that each word or abbreviation begins with a capital letter. Class names are typically spelled in PascalCase. Examples include:
This form is also known as upper camel case to distinguish it from lower camel case, which is simply called camelCase. In this documentation, "PascalCase" means upper camel case and "camelCase" means lower camel case.
An Angular pipe is a function that transforms input values to output values for
display in a view. Use the
to associate the pipe function with a name. You then use that
name in your HTML to declaratively transform values on screen.
Here's an example that uses the built-in
currency pipe to display
a numeric value in the local currency.
Read more in the page on pipes.
A provider creates a new instance of a dependency for the dependency injection system. It relates a lookup token to code—sometimes called a "recipe"—that can create a dependency value.
Most applications consist of many screens or views. The user navigates among them by clicking links and buttons, and performing other similar actions that cause the application to replace one view with another.
The Angular component router is a richly featured mechanism for configuring and managing the entire view navigation process including the creation and destruction of views.
An Angular component with a
RouterOutlet that displays views based on router navigations.
For more information, see the Routing & Navigation page.
The practice of writing compound words or phrases such that an
_) separates one word from the next. This form is also known as underscore case.
For data or logic that is not associated with a specific view or that you want to share across components, build services.
Applications often require services such as a hero data service or a logging service.
A service is a class with a focused purpose. We often create a service to implement features that are independent from any specific view, provide shared data or logic across components, or encapsulate external interactions.
A category of directive that can
shape or reshape HTML layout, typically by adding, removing, or manipulating
elements and their children; for example, the
ngIf "conditional element" directive and the
ngFor "repeater" directive.
Read more in the Structural Directives page.
An expression is a TypeScript-like syntax that Angular evaluates within a data binding.
Read about how to write template expressions in the Template Syntax page.
TypeScript is also noteable for its optional typing system, which gives us compile-time type checking and strong tooling support (for example, "intellisense", code completion, refactoring, and intelligent search). Many code editors and IDEs support TypeScript either natively or with plugins.
Read more about TypeScript at typescript.org.
A view is a portion of the screen that displays information and responds to user actions such as clicks, mouse moves, and keystrokes.
Angular renders a view under the control of one or more directives, especially component directives and their companion templates. The component plays such a prominent role that it's often convenient to refer to a component as a view.
Views often contain other views and any view might be loaded and unloaded dynamically as the user navigates through the application, typically under the control of a router.
Zones intercept all of these activities and give a "zone client" the opportunity to take action before and after the async activity finishes.
Angular runs your application in a zone where it can respond to asynchronous events by checking for data changes, and updating the information it displays via data bindings.
Learn more about zones in this Brian Ford video.