RequestContext
, as each one has a controller
property that extends from the app's global container.ioc
, you can automatically inject the dependencies of any route handler.Controller
s have dependencies injected without any additional configuration by you. However, you might want to inject dependencies into the constructor of your controller.dart:mirrors
or other ReflectionEmptyReflector()
to power its Container
instances, which has no support for dart:mirrors
, so that it can be used in contexts where Dart reflection is not available.Reflector
, you can use the full power of Angel's DI system. angel init
projects use the MirrorsReflector()
by default.Controller
s, via @Expose()
or @ExposeWS()
container.make
callsioc
function in any routeMirrorsReflector
from package:angel_container/mirrors.dart
is by far the most convenient pattern, so use it if possible.package:angel_container_generator
StaticReflector
Reflector
interface (cumbersome; not recommended)