angular library

The primary library for the AngularDart web framework.

Import this library as follows:

import 'package:angular/angular.dart';

For help using this library, see the AngularDart documentation:

Classes

AfterChanges
Implement this interface to get notified when any data-bound property of your directive is changed by the Angular framework. [...]
AfterContentChecked
Implement this interface to get notified after every check of your directive's content. [...]
AfterContentInit
Implement this interface to get notified when your directive's content has been fully initialized. [...]
AfterViewChecked
Implement this interface to get notified after every check of your component's view. [...]
AfterViewInit
Implement this interface to get notified when your component's view has been fully initialized. [...]
ApplicationRef
A reference to an Angular application running on a page. [...]
AsyncPipe
An async pipe awaits for a value from a Future or Stream. When a value is received, the async pipe marks the component to be checked for changes. [...]
Attribute
An annotation to specify that a constant attribute value should be injected. [...]
ChangeDetectionStrategy
Describes within the change detector which strategy will be used the next time change detection is triggered. [...]
ChangeDetectorRef
ClassProvider<T>
Describes at compile-time configuring to return an instance of a class. [...]
Component
Declare reusable UI building blocks for an application. [...]
ComponentFactory<T>
Backing implementation behind a class T annotated with @Component. [...]
ComponentLoader
Supports imperatively loading and binding new components at runtime. [...]
ComponentRef<C>
Represents an instance of a Component created via a ComponentFactory. [...]
ComponentState
Mixin representing an component or directive with observable state change. [...]
ContentChild
Declares a reference to a single child node projected into <ng-content>. [...]
ContentChildren
Declares a reference to multiple child nodes projected into <ng-content>. [...]
CurrencyPipe
WARNING: this pipe uses the Internationalization API. Therefore it is only reliable in Chrome and Opera browsers. [...]
DatePipe
Formats a date value to a string based on the requested format. [...]
DecimalPipe
WARNING: this pipe uses the Internationalization API. Therefore it is only reliable in Chrome and Opera browsers. [...]
Directive
An annotation that marks a class as an Angular directive, allowing you to attach behavior to elements in the DOM. [...]
DoCheck
Implement to execute ngDoCheck and implement your own change detection. [...]
ElementRef
A wrapper around a native element inside of a View. [...]
EmbeddedViewRef
Represents an Angular View. [...]
EventManagerPlugin
ExceptionHandler
Provides a hook for centralized exception handling. [...]
ExistingProvider<T>
Describes at compile-time configuring to redirect to another token. [...]
FactoryProvider<T>
Describes at compile-time configuring to invoke a factory function. [...]
GenerateInjector
Annotates a method to generate an Injector factory at compile-time. [...]
GetTestability
Adapter interface for retrieving the Testability service associated for a particular context.
Host
Specifies that an injector should retrieve a dependency from any injector until reaching the closest host. [...]
HostBinding
Declares a host property on the host component or element. [...]
HostListener
Declares listening to eventName on the host element of the directive. [...]
Inject
A parameter metadata that specifies a dependency. [...]
Injectable
Compile-time metadata that marks a class Type or Function for injection. [...]
Injector
Support for imperatively loading dependency injected services at runtime. [...]
Input
Declares a data-bound input property. [...]
JsonPipe
Transforms any input value using JSON.encode. Useful for debugging.
LowerCasePipe
Transforms text to lowercase.
Module
Encapsulates a reusable set of dependency injection configurations. [...]
MultiToken<T>
A token representing multiple values of T for dependency injection. [...]
NgClass
The NgClass directive conditionally adds and removes CSS classes on an HTML element based on an expression's evaluation result. [...]
NgFor
The NgFor directive instantiates a template once per item from an iterable. The context for each instantiated template inherits from the outer context with the given loop variable set to the current item from the iterable. [...]
NgIf
Causes an element and its contents to be conditionally added/removed from the DOM based on the value of the given boolean template expression. [...]
NgStyle
The NgStyle directive changes an element's style based on the bound style expression: [...]
NgSwitch
Adds or removes DOM sub-trees when their match expressions match the switch expression. [...]
NgSwitchDefault
Default case statements are displayed when no match expression matches the switch expression value. [...]
NgSwitchWhen
Insert the sub-tree when the ngSwitchWhen expression evaluates to the same value as the enclosing switch expression. [...]
NgTemplateOutlet
Inserts an embedded view, created from a TemplateRef. [...]
NgZone
Handles and observes the side-effects of executing callbacks in AngularDart. [...]
NgZoneError
Stores error information; delivered via NgZone.onError stream.
OnChanges
Implement this interface to get notified when any data-bound property of your directive is changed by the Angular framework. [...]
OnDestroy
Implement to execute ngOnDestroy before your component is destroyed. [...]
OnInit
Implement to execute ngOnInit after the first change-detection completed. [...]
OpaqueToken<T>
A token to be used instead of Type when configuring dependency injection. [...]
Optional
A parameter metadata that marks a dependency as optional. [...]
Output
Declares an event-bound output property. [...]
PercentPipe
WARNING: this pipe uses the Internationalization API. Therefore it is only reliable in Chrome and Opera browsers. [...]
Pipe
Declare reusable pipe function. [...]
PipeTransform
To create a Pipe, you must implement this interface. [...]
Provider<T>
Describes at compile-time how an Injector should be configured. [...]
ReflectiveInjector
An injector that resolves Provider instances with runtime information.
ReplacePipe
Creates a new String with some or all of the matches of a pattern replaced by a replacement. [...]
Self
Specifies that an Injector should retrieve a dependency only from itself. [...]
SimpleChange
Represents a basic change from a previous to a new value.
SkipSelf
Specifies that the dependency resolution should start from the parent injector. [...]
SlicePipe
Creates a new List or String containing a subset (slice) of the elements. [...]
SlowComponentLoader
Supports imperatively loading and binding new components at runtime. [...]
TemplateRef
Represents an Embedded Template that can be used to instantiate Embedded Views. [...]
Testability
The Testability service provides testing hooks that can be accessed from the browser and by services such as Protractor. Each bootstrapped Angular application on the page will have an instance of Testability.
TestabilityRegistry
A global registry of Testability instances for specific elements.
Typed<T>
Declares a typed directive or defines type argument of type T. [...]
UpperCasePipe
Implements uppercase transforms to text.
ValueProvider<T>
Describes at compile-time using a constant value to represent a token. [...]
ViewChild
Declares a reference to a single child node in a component's template. [...]
ViewChildren
Declares a reference to multiple child nodes in a component's template. [...]
ViewContainerRef
Represents a container where one or more Views can be attached. [...]
ViewRef

Constants

APP_ID → const OpaqueToken<String>
A dependency injection token representing a unique ID for the application. [...]
const OpaqueToken<String>('APP_ID')
COMMON_DIRECTIVES → const List<Type>
@Deprecated('Renamed to "coreDirectives"')
coreDirectives
commonPipes → const List<Type>
A collection of built-in AngularDart core pipes. [...]
const [AsyncPipe, UpperCasePipe, LowerCasePipe, JsonPipe, SlicePipe, DecimalPipe, PercentPipe, CurrencyPipe, DatePipe, ReplacePipe]
CORE_DIRECTIVES → const List<Type>
@Deprecated('Renamed to "coreDirectives"')
const [NgClass, NgFor, NgIf, NgTemplateOutlet, NgStyle, NgSwitch, NgSwitchWhen, NgSwitchDefault]
coreDirectives → const List<Type>
A collection of Angular core directives that are likely to be used in each and every Angular application. This includes core directives (e.g., NgIf and NgFor). [...]
CORE_DIRECTIVES
noValueProvided → const Object
A marker that represents a lack-of-value for the useValue parameter.
'__noValueProvided__'

Functions

bootstrapStatic<T>(Type componentType, [ List<Object> providers = const [], void initReflector() ]) → Future<ComponentRef<T>>
Starts a new AngularDart application with componentType as the root. [...]
@Deprecated('Renamed "runAppLegacy". See "runApp" for the preferred API.')
disableDebugTools() → void
Disables Angular 2 tools.
enableDebugTools(ComponentRef ref) → void
Enabled Angular 2 debug tools that are accessible via your browser's developer console. [...]
provide<T>(Object token, { Type useClass, Object useValue: noValueProvided, Object useExisting, Function useFactory, List<Object> deps, bool multi }) Provider<T>
Short-hand for new Provider(...). [...]
runApp<T>(ComponentFactory<T> componentFactory, { InjectorFactory createInjector: _identityInjector }) ComponentRef<T>
Starts a new AngularDart application with componentFactory as the root. [...]
runAppAsync<T>(ComponentFactory<T> componentFactory, { Future<void> beforeComponentCreated(Injector), InjectorFactory createInjector: _identityInjector }) → Future<ComponentRef<T>>
Asynchronous alternative to runApp, supporting beforeComponentCreated. [...]
runAppLegacy<T>(Type componentType, { List<Object> createInjectorFromProviders: const [], void initReflector() }) ComponentRef<T>
Starts a new AngularDart application with componentType as the root. [...]
runAppLegacyAsync<T>(Type componentType, { Future<void> beforeComponentCreated(Injector), List<Object> createInjectorFromProviders: const [], void initReflector() }) → Future<ComponentRef<T>>
Starts a new AngularDart application with componentType as the root. [...]

Enums

ViewEncapsulation
Defines template and style encapsulation options available for Component's View. [...]
Visibility
Options for configuring whether a directive class can be injected. [...]

Typedefs

ComponentStateCallback() → void
InjectorFactory([Injector parent ]) Injector
Defines a function that creates an injector around a parent injector. [...]
TrackByFn(int index, dynamic item) → Object
A function that can be used to return a unique key for item at index. [...]

Exceptions / Errors

ExpressionChangedAfterItHasBeenCheckedException
An error thrown if application changes model breaking the top-down data flow. [...]
InjectionError
A class of error that is thrown related to dependency injection. [...]
NoProviderError
Thrown when there is no dependency injection provider found for a token.