- Start support for auto-generated routes using UniversalPath
All checks were successful
continuous-integration/drone/push Build is passing

- Start support for custom view engine props & functions
- Start login template and namespace
This commit is contained in:
2021-06-29 01:44:07 -05:00
parent faa8a31102
commit cf6d14abca
9 changed files with 172 additions and 14 deletions

View File

@@ -28,7 +28,7 @@ export class MountActivatedRouteHTTPModule extends HTTPKernelModule {
const route = this.routing.match(request.method, request.path)
if ( route ) {
this.logging.verbose(`Mounting activated route: ${request.path} -> ${route}`)
const activated = new ActivatedRoute(route, request.path)
const activated = <ActivatedRoute> request.make(ActivatedRoute, route, request.path)
request.registerSingletonInstance<ActivatedRoute>(ActivatedRoute, activated)
} else {
this.logging.debug(`No matching route found for: ${request.method} -> ${request.path}`)

View File

@@ -1,9 +1,11 @@
import {ErrorWithContext} from '../../util'
import {ResolvedRouteHandler, Route} from './Route'
import {Injectable} from '../../di'
/**
* Class representing a resolved route that a request is mounted to.
*/
@Injectable()
export class ActivatedRoute {
/**
* The parsed params from the route definition.