Controller class
Supports grouping routes with shared functionality.
Constructors
- Controller({bool injectSingleton = true})
Properties
- app → Angel
-
The Angel application powering this controller.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- 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.
getter/setter pair
-
mountPoint
→ SymlinkRoute<
RequestHandler> ? -
The route at which this controller is mounted on the server.
no setter
-
routeMappings
↔ Map<
String, Route> -
A mapping of route paths to routes, produced from the Expose annotations on this class.
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
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
. -
findExpose(
Reflector reflector, {bool concreteOnly = false}) → Expose? - Finds the Expose declaration for this class.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited