di library

NOTE: As of 2020-08-12, this library is DEPRECATED.

The actual deprecation notice is on the user-visible import located in //third_party/dart/angular/lib/di.dart, which exports this file.

See go/angular-di.dart-deprecated.

Classes

ClassProvider<T extends Object>
Describes at compile-time configuring to return an instance of a class.
Component
Declare reusable UI building blocks for an application.
Directive
An annotation that marks a class as an Angular directive, allowing you to attach behavior to elements in the DOM.
ExistingProvider<T extends Object>
Describes at compile-time configuring to redirect to another token.
FactoryProvider<T extends Object>
Describes at compile-time configuring to invoke a factory function.
GenerateInjector
Annotates a method to generate an Injector factory at compile-time.
Host
Specifies that an injector should retrieve a dependency from any injector until reaching the closest host.
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.
Module
Encapsulates a reusable set of dependency injection configurations.
MultiToken<T extends Object>
A token representing multiple values of T for dependency injection.
OpaqueToken<T extends Object>
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.
Pipe
Declare reusable pipe function.
Provider<T extends Object>
Describes at compile-time how an Injector should be configured.
ReflectiveInjector
An injector that resolves Provider instances with runtime information.
Self
Specifies that an Injector should retrieve a dependency only from itself.
SkipSelf
Specifies that the dependency resolution should start from the parent injector.
ValueProvider<T extends Object>
Describes at compile-time using a constant value to represent a token.

Constants

noValueProvided → const Object
A marker that represents a lack-of-value for the useValue parameter.

Functions

provide<T extends Object>(Object token, {Type? useClass, Object useValue = noValueProvided, Object? useExisting, Function? useFactory, List<Object>? deps}) Provider<T>
Short-hand for Provider(...).

Typedefs

InjectorFactory = Injector Function(Injector parent)
Defines a function that creates an injector around a parent injector.