* Register a controller class with this server. * * @param controllerCtor - The controller class * (constructor function). * @returns The newly created binding, you can use the reference to * further modify the binding, e.g. lock the value to prevent further * modifications. *
(controllerCtor: ControllerClass<ControllerInstance>)
| 609 | * |
| 610 | */ |
| 611 | controller(controllerCtor: ControllerClass<ControllerInstance>): Binding { |
| 612 | return this.bind('controllers.' + controllerCtor.name).toClass( |
| 613 | controllerCtor, |
| 614 | ); |
| 615 | } |
| 616 | |
| 617 | /** |
| 618 | * Register a new Controller-based route. |