Options
All
  • Public
  • Public/Protected
  • All
Menu

Get controller method as handler

Hierarchy

  • RouteController

Index

Constructors

constructor

Properties

Optional controllerName

controllerName: string

options

options: IOptions

Methods

Private _getName

  • _getName(name: string): string
  • Get controller name

    Parameters

    • name: string

      base name, declared in json definition

    Returns string

    • controller name

Private _parse

  • _parse(controller: string, routeParams?: string): Array<string>
  • Parse route string

    Parameters

    • controller: string

      controller

    • Optional routeParams: string

    Returns Array<string>

    array with postion 0 - controller path, 1 - controller function

getHandler

  • getHandler(routeParams?: string, globalController?: string): IHandler
  • Get controller called function

    Parameters

    • Optional routeParams: string
    • Optional globalController: string

    Returns IHandler

    object with function a name

startWith

  • startWith(value: any, char: any): boolean
  • check if a string start with a string

    Parameters

    • value: any

      string value to check

    • char: any

      check term

    Returns boolean

    • true if strat with char

Generated using TypeDoc