-
-
Notifications
You must be signed in to change notification settings - Fork 0
route
Nathanaël Cherrier (CI) edited this page Aug 27, 2019
·
4 revisions
interface IRoute {
path: string,
action: string|IAction,
methodes: HttpMethod[]
}Represents a route: a single endpoint. A Controller contains a list of routes.
export class AController extends Controller {
get routes(): Route[] {
return [{ path: 'home', action: 'homeAction', methods: [HttpMethod.GET] }]
}
}-
path: The path of the endpoint -
actions: The name or an instance of the linked route. -
methods: List of allowed methods.