Controller class
Supports grouping routes with shared functionality.
Constructors
- Controller({bool injectSingleton = true})
Properties
- app → Angel
-
The Angel application powering this controller.
read-only
- hashCode → int
-
The hash code for this object. [...]
read-only, inherited
- injectSingleton → bool
-
If
true
(default), this class will inject itself as a singleton into the app's container when bootstrapped.final -
middleware
↔ List<
RequestHandler> -
Middleware to run before all handlers in this class.
read / write
-
mountPoint
→ SymlinkRoute<
RequestHandler> -
The route at which this controller is mounted on the server.
read-only
-
routeMappings
↔ Map<
String, Route> -
A mapping of route paths to routes, produced from the Expose annotations on this class.
read / write
- runtimeType → Type
-
A representation of the runtime type of the object.
read-only, inherited
Methods
-
applyRoutes(
Router< RequestHandler> router, Reflector reflector) → Future<String> -
Applies the routes from this Controller to some
router
. -
configureRoutes(
Routable routable) → FutureOr< void> - Used to add additional routes or middlewares to the router from within a Controller. [...]
-
configureServer(
Angel app) → Future< void> -
Applies routes, DI, and other configuration to an
app
.@mustCallSuper -
findExpose(
Reflector reflector, {bool concreteOnly = false}) → Expose - Finds the Expose declaration for this class. [...]
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed. [...]
inherited
-
toString(
) → String -
Returns a string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator. [...]
inherited